You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by aw...@apache.org on 2006/09/26 22:11:34 UTC
svn commit: r450173 - in /incubator/openjpa/trunk:
openjpa-kernel/src/main/resources/org/apache/openjpa/conf/
openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/
openjpa-persistence/src/main/java/org/apache/openjpa/persistence/
openjpa-persistence/s...
Author: awhite
Date: Tue Sep 26 13:11:33 2006
New Revision: 450173
URL: http://svn.apache.org/viewvc?view=rev&rev=450173
Log:
Fix configuration warnings for misspelled property names.
Modified:
incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryValue.java
incubator/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties?view=diff&rev=450173&r1=450172&r2=450173
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties Tue Sep 26 13:11:33 2006
@@ -3,7 +3,7 @@
that should be used for class resolution. Defaults to a spec-compliant \
resolver.
ClassResolver-type: General
-ClassResolver-cat: JDO.Classes
+ClassResolver-cat: Persistence.Classes
ClassResolver-displayorder: 50
ClassResolver-expert: true
ClassResolver-interface: org.apache.openjpa.util.ClassResolver
@@ -12,15 +12,15 @@
BrokerFactory-desc: The name of the org.apache.openjpa.kernel.BrokerFactory \
class that Bootstrap.getBrokerFactory should create. Typically \
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory
-BrokerFactory-type: JDO
-BrokerFactory-cat: JDO.Advanced
+BrokerFactory-type: Persistence
+BrokerFactory-cat: Persistence.Advanced
BrokerFactory-displayorder: 50
BrokerImpl-name: Broker implementation
BrokerImpl-desc: Broker plugin and properties. If you use a custom class, it \
must extend org.apache.openjpa.kernel.BrokerImpl.
BrokerImpl-type: General
-BrokerImpl-cat: JDO.Advanced
+BrokerImpl-cat: Persistence.Advanced
BrokerImpl-displayorder: 50
BrokerImpl-expert: true
BrokerImpl-interface: org.apache.openjpa.kernel.BrokerImpl
@@ -83,14 +83,14 @@
TransactionMode-name: Transaction mode
TransactionMode-desc: Either "local" or "managed".
TransactionMode-type: Connecting
-TransactionMode-cat: JDO.Transactions
+TransactionMode-cat: Persistence.Transactions
TransactionMode-displayorder: 50
ManagedRuntime-name: Managed runtime
ManagedRuntime-desc: Plugin used to integrate with an external transaction \
manager. Must implement org.apache.openjpa.kernel.ManagedRuntime.
ManagedRuntime-type: General
-ManagedRuntime-cat: JDO.Advanced
+ManagedRuntime-cat: Persistence.Advanced
ManagedRuntime-displayorder: 50
ManagedRuntime-expert: true
ManagedRuntime-interface: org.apache.openjpa.ee.ManagedRuntime
@@ -166,7 +166,7 @@
enters a datastore transaction. If "all", object field values also \
clear when entering optimistic transactions.
AutoClear-type: General
-AutoClear-cat: JDO.Transactions.Advanced
+AutoClear-cat: Persistence.Transactions.Advanced
AutoClear-displayorder: 50
ConnectionRetainMode-name: Connection retain mode
@@ -205,7 +205,7 @@
throwing an exception. Should only be set to true under complex \
classloader topologies that are causing registration errors.
RetryClassRegistration-type: General
-RetryClassRegistration-cat: JDO.Classes
+RetryClassRegistration-cat: Persistence.Classes
RetryClassRegistration-displayorder: 60
RetryClassRegistration-expert: true
@@ -213,7 +213,7 @@
ProxyManager-desc: Plugin used to proxy second class object fields of managed \
instances. Must implement org.apache.openjpa.util.ProxyManager.
ProxyManager-type: General
-ProxyManager-cat: JDO.Advanced
+ProxyManager-cat: Persistence.Advanced
ProxyManager-displayorder: 50
ProxyManager-expert: true
@@ -300,8 +300,8 @@
Optimistic-name: Optimistic transactions
Optimistic-desc: Selects between optimistic and pessimistic (data store) \
transactional modes.
-Optimistic-type: JDO
-Optimistic-cat: JDO.Transactions
+Optimistic-type: Persistence
+Optimistic-cat: Persistence.Transactions
Optimistic-displayorder: 50
RetainState-name: Retain values
@@ -310,8 +310,8 @@
transaction commits. Otherwise, persistence-capable objects must \
transition to the hollow state upon commit, meaning that subsequent reads \
will result in a database round-trip.
-RetainState-type: JDO
-RetainState-cat: JDO.Transactions.Advanced
+RetainState-type: Persistence
+RetainState-cat: Persistence.Transactions.Advanced
RetainState-displayorder: 50
RestoreState-name: Restore state
@@ -320,8 +320,8 @@
their original values upon a rollback. If set to "all", mutable fields \
will also be restored. If false, the values will not be changed upon \
rollback.
-RestoreState-type: JDO
-RestoreState-cat: JDO.Transactions.Advanced
+RestoreState-type: Persistence
+RestoreState-cat: Persistence.Transactions.Advanced
RestoreState-displayorder: 50
AutoDetach-name: Auto detach
@@ -347,7 +347,7 @@
deletions, and additions in the current trasnaction when executing a \
query. Else, OpenJPA is free to ignore changes and execute the query \
directly against the data store.
-IgnoreChanges-type: JDO
+IgnoreChanges-type: Persistence
IgnoreChanges-cat: Queries
IgnoreChanges-displayorder: 50
@@ -355,16 +355,16 @@
NontransactionalRead-desc: If true, then it is possible to read \
persistent data outside the context of a transaction. Otherwise, a \
transaction must be in progress in order read data.
-NontransactionalRead-type: JDO
-NontransactionalRead-cat: JDO.Transactions
+NontransactionalRead-type: Persistence
+NontransactionalRead-cat: Persistence.Transactions
NontransactionalRead-displayorder: 50
NontransactionalWrite-name: Non-transactional write
NontransactionalWrite-desc: If true, then it is possible to write to \
fields of a persistent-nontransactional object when a transaction is not \
in progress. If false, such a write will result in an exception.
-NontransactionalWrite-type: JDO
-NontransactionalWrite-cat: JDO.Transactions
+NontransactionalWrite-type: Persistence
+NontransactionalWrite-cat: Persistence.Transactions
NontransactionalWrite-displayorder: 50
Multithreaded-name: Multithreaded
@@ -372,8 +372,8 @@
threads simultaneously accessing a single context or object, so measures \
must be taken to ensure that the implementation is thread-safe. Otherwise, \
the implementation need not address thread safety.
-Multithreaded-type: JDO
-Multithreaded-cat: JDO.Optimization
+Multithreaded-type: Persistence
+Multithreaded-cat: Persistence.Optimization
Multithreaded-displayorder: 50
ConnectionUserName-name: Connection username
@@ -435,7 +435,7 @@
PersistenceServer-name: Remote persistence support
PersistenceServer-desc: Define the remote persistence server.
PersistenceServer-type: General
-PersistenceServer-cat: JDO.Remote
+PersistenceServer-cat: Persistence.Remote
PersistenceServer-displayorder: 50
PersistenceServer-expert: true
PersistenceServer-interface: org.apache.openjpa.lib.remote.Transport
@@ -462,7 +462,7 @@
Set to true to use the default inverse manager. Custom inverse managers \
must extend org.apache.openjpa.kernel.InverseManager.
InverseManager-type: General
-InverseManager-cat: JDO.Advanced
+InverseManager-cat: Persistence.Advanced
InverseManager-displayorder: 50
InverseManager-expert: true
InverseManager-interface: org.apache.openjpa.kernel.InverseManager
@@ -472,7 +472,7 @@
partial rollback/commit support. Defaults to "in-mem". Custom savepoint \
managers must implement org.apache.openjpa.kernel.SavepointManager.
SavepointManager-type: General
-SavepointManager-cat: JDO.Advanced
+SavepointManager-cat: Persistence.Advanced
SavepointManager-displayorder: 50
SavepointManager-expert: true
SavepointManager-interface: org.apache.openjpa.kernel.SavepointManager
@@ -482,7 +482,7 @@
in the database. May be a custom action implementing \
org.apache.openjpa.event.OrphanedKeyAction.
OrphanedKeyAction-type: General
-OrphanedKeyAction-cat: JDO.Advanced
+OrphanedKeyAction-cat: Persistence.Advanced
OrphanedKeyAction-displayorder: 50
OrphanedKeyAction-expert: true
OrphanedKeyAction-interface: org.apache.openjpa.event.OrphanedKeyAction
@@ -519,7 +519,7 @@
Mapping-name: Datastore mapping
Mapping-desc: The name of the datastore mapping to use.
-Mapping-type: JDO
+Mapping-type: Persistence
Mapping-cat: Mappings
Mapping-displayorder: 50
@@ -527,7 +527,7 @@
Compatibility-desc: Details about various compatibiity options for the current \
environment.
Compatibility-type: General
-Compatibility-cat: JDO.Advanced
+Compatibility-cat: Persistence.Advanced
Compatibility-displayorder: 50
Compatibility-expert: true
Compatibility-interface: org.apache.openjpa.conf.Compatibility
Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?view=diff&rev=450173&r1=450172&r2=450173
==============================================================================
--- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java Tue Sep 26 13:11:33 2006
@@ -398,10 +398,12 @@
try {
_pds[i] = getPropertyDescriptor(val);
} catch (MissingResourceException mre) {
+mre.printStackTrace();
if (failures == null)
failures = new ArrayList();
failures.add(val.getProperty());
} catch (IntrospectionException ie) {
+ie.printStackTrace();
if (failures == null)
failures = new ArrayList();
failures.add(val.getProperty());
@@ -425,8 +427,8 @@
// set up property descriptor
PropertyDescriptor pd;
try {
- pd = new PropertyDescriptor
- (Introspector.decapitalize(prop), getClass());
+ pd = new PropertyDescriptor(Introspector.decapitalize(prop),
+ getClass());
} catch (IntrospectionException ie) {
// if there aren't any methods for this value(i.e., if it's a
// dynamically-added value), then an IntrospectionException will
@@ -707,8 +709,10 @@
String[] prefixes = ProductDerivations.getConfigurationPrefixes();
for (int i = 0; i < prefixes.length; i++) {
if (propName.toLowerCase().startsWith(prefixes[i])
- && propName.length() > prefixes[i].length()
- && propName.indexOf('.', prefixes[i].length()) == -1)
+ && propName.length() > prefixes[i].length() + 1
+ && propName.indexOf('.', prefixes[i].length())
+ == prefixes[i].length()
+ && propName.indexOf('.', prefixes[i].length() + 1) == -1)
return true;
}
return false;
Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryValue.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryValue.java?view=diff&rev=450173&r1=450172&r2=450173
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryValue.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryValue.java Tue Sep 26 13:11:33 2006
@@ -56,5 +56,6 @@
setAliases(ALIASES);
setDefault(ALIASES[0]);
setClassName(ALIASES[1]);
+ setScope(getClass());
}
}
Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties?view=diff&rev=450173&r1=450172&r2=450173
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties Tue Sep 26 13:11:33 2006
@@ -40,15 +40,6 @@
bad-fg-field: Fetch group "{0}" in type "{1}" includes field "{2}", but \
this field is not declared in "{1}", or is not persistent. Currently, \
OpenJPA only supports declared fields in fetch groups.
-mult-fgs: Field "{0}" is included in fetch group "{1}", but is already in \
- fetch group "{2}". OpenJPA currently limits fields to one fetch group.
-mult-fgs-default: Field "{0}" is included in fetch group "{1}", but is also in \
- the default fetch group. OpenJPA currently limits fields to one fetch group. \
- Set the field''s "fetch" attribute to "FetchType.LAZY" to exclude it \
- from the default fetch group.
-nonzero-fetch-depth: Fetch group "{0}" in type "{1}" sets a non-zero \
- fetch-depth for field "{2}". OpenJPA currently only supports a fetch depth \
- of zero. Resetting depth to 0.
not-update-delete-query: Cannot perform an update or delete operation \
on select query: "{0}".
not-select-query: Cannot perform a select on update or delete query: "{0}".
@@ -73,7 +64,7 @@
integers starting at 1.
conf-load: Setting the following properties from "{0}" into configuration: {1}
no-named-field: Type "{0}" does not have a managed field named "{1}".
-unsupported-tag: OpenJPA does not currently support XML element "{0}". Ignoring.
+unsupported-tag: OpenJPA does not currently support XML element "{0}". Ignoring.
no-class: No class attribute was specified.
invalid-id-class: Could not load id class "{1}" for type "{0}".
invalid-attr: Could not find property/field with the name "{0}" in type "{1}".
@@ -100,3 +91,12 @@
missing-no-arg-constructor: Entity listener class "{0}" must declare a no-arg \
constructor. "AllowsNoArgConstructorCallback" property of MetaDataDefaults \
can be set to true to ignore this exception.
+
+EntityManagerFactory-name: EntityManagerFactory implementation
+EntityManagerFactory-desc: Allows extension of standard \
+ org.apache.openjpa.persistence.EntityManagerFactoryImpl for custom behavior.
+EntityManagerFactory-type: General
+EntityManagerFactory-cat: Persistence.Advanced
+EntityManagerFactory-displayorder: 50
+EntityManagerFactory-expert: true
+EntityManagerFactory-interface: org.apache.openjpa.persistence.EntityManagerFactoryImpl