KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > config > TopLinkProperties


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2006, Oracle. All rights reserved.
22
package oracle.toplink.essentials.config;
23
24 /**
25  *
26  * The class defines TopLink properties' names.
27  *
28  * JPA persistence properties could be specified either in PersistenceUnit or
29  * passes to createEntityManagerFactory / createContainerEntityManagerFactory
30  * methods of EntityManagerFactoryProvider.
31  *
32  * Property values are usually case-insensitive with some common sense exceptions,
33  * for instance class names.
34  *
35  * @see CacheType
36  * @see TargetDatabase
37  * @see TargetServer
38  *
39  */

40 public class TopLinkProperties {
41     // Connection properties.
42
public static final String JavaDoc JDBC_DRIVER = "toplink.jdbc.driver";
43     public static final String JavaDoc JDBC_URL = "toplink.jdbc.url";
44     // use "" to reset user name
45
public static final String JavaDoc JDBC_USER = "toplink.jdbc.user";
46     public static final String JavaDoc JDBC_PASSWORD = "toplink.jdbc.password";
47
48     // TopLink JDBC (internal) connection pools properties. Ignored in case external connection pools are used.
49
// Maximum number of connections in TopLink write connection pool by default is 10.
50
public static final String JavaDoc JDBC_WRITE_CONNECTIONS_MAX = "toplink.jdbc.write-connections.max";
51     // Minimum number of connections in TopLink write connection pool by default is 5.
52
public static final String JavaDoc JDBC_WRITE_CONNECTIONS_MIN = "toplink.jdbc.write-connections.min";
53     // Maximum number of connections in TopLink read connection pool by default is 2.
54
public static final String JavaDoc JDBC_READ_CONNECTIONS_MAX = "toplink.jdbc.read-connections.max";
55     // Minimum number of connections in TopLink read connection pool by default is 2.
56
public static final String JavaDoc JDBC_READ_CONNECTIONS_MIN = "toplink.jdbc.read-connections.min";
57     // Indicates wheather connections in TopLink read connection pool should be shared.
58
// Valid values are case-insensitive "false" and "true"; "false" is default.
59
public static final String JavaDoc JDBC_READ_CONNECTIONS_SHARED = "toplink.jdbc.read-connections.shared";
60
61     // Bind all parameters property. Valid values are case-insensitive "true" and "false"; "true" is default.
62
public static final String JavaDoc JDBC_BIND_PARAMETERS = "toplink.jdbc.bind-parameters";
63
64     // Caching Prefixes
65
// Property names formed out of these prefixes by appending either
66
// entity name, or class name (indicating that the property values applies only to a particular entity)
67
// or DEFAULT suffix (indicating that the property value applies to all entities).
68
// CACHE_SIZE_ properties default value is 1000
69
public static final String JavaDoc CACHE_SIZE_ = "toplink.cache.size.";
70     // All valid values for CACHE_TYPE_ properties are declared in CacheType class.
71
public static final String JavaDoc CACHE_TYPE_ = "toplink.cache.type.";
72     // Indicates whether entity's cache should be shared.
73
// Valid values are case-insensitive "false" and "true"; "false" is default.
74
public static final String JavaDoc CACHE_SHARED_ = "toplink.cache.shared.";
75     
76     // Default Suffix could be appended to some prefixes to form a property name
77
public static final String JavaDoc DEFAULT = "default";
78     
79     // Default caching properties - apply to all entities.
80
// May be overridden by individual entity property with the same prefix.
81
public static final String JavaDoc CACHE_SIZE_DEFAULT = CACHE_SIZE_ + DEFAULT;
82     public static final String JavaDoc CACHE_TYPE_DEFAULT = CACHE_TYPE_ + DEFAULT;
83     public static final String JavaDoc CACHE_SHARED_DEFAULT = CACHE_SHARED_ + DEFAULT;
84
85     // Customizations properties
86

87     // Valid values are names of levels defined in java.util.logging.Level,
88
// default value is java.util.logging.Level.CONFIG.getName()
89
public static final String JavaDoc LOGGING_LEVEL = "toplink.logging.level";
90     // By default ("true") the date is always logged.
91
// This can be turned off ("false").
92
public static final String JavaDoc LOGGING_TIMESTAMP = "toplink.logging.timestamp";
93     // By default ("true") the thread is logged at FINE or less level.
94
// This can be turned off ("false").
95
public static final String JavaDoc LOGGING_THREAD = "toplink.logging.thread";
96     // By default ("true") the Session is always printed whenever available.
97
// This can be turned off ("false").
98
public static final String JavaDoc LOGGING_SESSION = "toplink.logging.session";
99     // By default ("true") stack trace is logged for SEVERE all the time and at FINER level for WARNING or less.
100
// This can be turned off ("false").
101
public static final String JavaDoc LOGGING_EXCEPTIONS = "toplink.logging.exceptions";
102     
103     // Valid values are defined in TargetDatabase class - they correspond to database platforms currently supported by TopLink.
104
// Also a customary database platform may be specified by supplying a full class name.
105
// Default value is TargetDatabase.Auto which means TopLink will try to automatically determine
106
// the correct database platrorm type.
107
public static final String JavaDoc TARGET_DATABASE = "toplink.target-database";
108     
109     // By default a unique session name is generated by TopLink, but the user
110
// can provide a customary session name - and make sure it's unique.
111
public static final String JavaDoc SESSION_NAME = "toplink.session-name";
112     
113     // Indicates whether weaving should be performed - "true" by default.
114
public static final String JavaDoc WEAVING = "toplink.weaving";
115     
116     // Valid values are defined in TargetServer class - they correspond to server platforms currently supported by TopLink.
117
// Also a customary server platform may be specified by supplying a full class name.
118
// Specifying a name of the class implementing ExternalTransactionController sets
119
// CustomServerPlatform with this controller.
120
// Default is TargetServer.None - JSE case.
121
public static final String JavaDoc TARGET_SERVER = "toplink.target-server";
122     
123     // Allows session customization. The value is a full name for a class which implements SessionCustomizer.
124
// Session customizer called after all other properties have been processed.
125
public static final String JavaDoc SESSION_CUSTOMIZER = "toplink.session.customizer";
126 // Under review public static final String RELATIONSHIPS_FETCH_DEFAULT = "toplink.relationships-fetch-default";
127

128     // Customization Prefix
129
// Property names formed out of this prefix by appending either
130
// entity name, or class name (indicating that the property values applies only to a particular entity)
131
// Allows descriptor customization. The value is a full name for a class which implements DescriptorCustomizer.
132
// Only session customizer is called after processing these properties.
133
public static final String JavaDoc DESCRIPTOR_CUSTOMIZER_ = "toplink.descriptor.customizer.";
134     
135 }
136
Popular Tags