Fix configuration warnings for misspelled property names.

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@450173 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
A. Abram White 2006-09-26 20:11:33 +00:00
parent 5b9c773c81
commit 46736c6018
4 changed files with 47 additions and 42 deletions

View File

@ -3,7 +3,7 @@ ClassResolver-desc: The org.apache.openjpa.util.ClassResolver implementation \
that should be used for class resolution. Defaults to a spec-compliant \ that should be used for class resolution. Defaults to a spec-compliant \
resolver. resolver.
ClassResolver-type: General ClassResolver-type: General
ClassResolver-cat: JDO.Classes ClassResolver-cat: Persistence.Classes
ClassResolver-displayorder: 50 ClassResolver-displayorder: 50
ClassResolver-expert: true ClassResolver-expert: true
ClassResolver-interface: org.apache.openjpa.util.ClassResolver ClassResolver-interface: org.apache.openjpa.util.ClassResolver
@ -12,15 +12,15 @@ BrokerFactory-name: BrokerFactory implementation
BrokerFactory-desc: The name of the org.apache.openjpa.kernel.BrokerFactory \ BrokerFactory-desc: The name of the org.apache.openjpa.kernel.BrokerFactory \
class that Bootstrap.getBrokerFactory should create. Typically \ class that Bootstrap.getBrokerFactory should create. Typically \
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory
BrokerFactory-type: JDO BrokerFactory-type: Persistence
BrokerFactory-cat: JDO.Advanced BrokerFactory-cat: Persistence.Advanced
BrokerFactory-displayorder: 50 BrokerFactory-displayorder: 50
BrokerImpl-name: Broker implementation BrokerImpl-name: Broker implementation
BrokerImpl-desc: Broker plugin and properties. If you use a custom class, it \ BrokerImpl-desc: Broker plugin and properties. If you use a custom class, it \
must extend org.apache.openjpa.kernel.BrokerImpl. must extend org.apache.openjpa.kernel.BrokerImpl.
BrokerImpl-type: General BrokerImpl-type: General
BrokerImpl-cat: JDO.Advanced BrokerImpl-cat: Persistence.Advanced
BrokerImpl-displayorder: 50 BrokerImpl-displayorder: 50
BrokerImpl-expert: true BrokerImpl-expert: true
BrokerImpl-interface: org.apache.openjpa.kernel.BrokerImpl BrokerImpl-interface: org.apache.openjpa.kernel.BrokerImpl
@ -83,14 +83,14 @@ RemoteCommitProvider-interface: org.apache.openjpa.event.RemoteCommitProvider
TransactionMode-name: Transaction mode TransactionMode-name: Transaction mode
TransactionMode-desc: Either "local" or "managed". TransactionMode-desc: Either "local" or "managed".
TransactionMode-type: Connecting TransactionMode-type: Connecting
TransactionMode-cat: JDO.Transactions TransactionMode-cat: Persistence.Transactions
TransactionMode-displayorder: 50 TransactionMode-displayorder: 50
ManagedRuntime-name: Managed runtime ManagedRuntime-name: Managed runtime
ManagedRuntime-desc: Plugin used to integrate with an external transaction \ ManagedRuntime-desc: Plugin used to integrate with an external transaction \
manager. Must implement org.apache.openjpa.kernel.ManagedRuntime. manager. Must implement org.apache.openjpa.kernel.ManagedRuntime.
ManagedRuntime-type: General ManagedRuntime-type: General
ManagedRuntime-cat: JDO.Advanced ManagedRuntime-cat: Persistence.Advanced
ManagedRuntime-displayorder: 50 ManagedRuntime-displayorder: 50
ManagedRuntime-expert: true ManagedRuntime-expert: true
ManagedRuntime-interface: org.apache.openjpa.ee.ManagedRuntime ManagedRuntime-interface: org.apache.openjpa.ee.ManagedRuntime
@ -166,7 +166,7 @@ AutoClear-desc: If "datastore", an object''s field values clears when it \
enters a datastore transaction. If "all", object field values also \ enters a datastore transaction. If "all", object field values also \
clear when entering optimistic transactions. clear when entering optimistic transactions.
AutoClear-type: General AutoClear-type: General
AutoClear-cat: JDO.Transactions.Advanced AutoClear-cat: Persistence.Transactions.Advanced
AutoClear-displayorder: 50 AutoClear-displayorder: 50
ConnectionRetainMode-name: Connection retain mode ConnectionRetainMode-name: Connection retain mode
@ -205,7 +205,7 @@ RetryClassRegistration-desc: Whether to log a warning and defer registration \
throwing an exception. Should only be set to true under complex \ throwing an exception. Should only be set to true under complex \
classloader topologies that are causing registration errors. classloader topologies that are causing registration errors.
RetryClassRegistration-type: General RetryClassRegistration-type: General
RetryClassRegistration-cat: JDO.Classes RetryClassRegistration-cat: Persistence.Classes
RetryClassRegistration-displayorder: 60 RetryClassRegistration-displayorder: 60
RetryClassRegistration-expert: true RetryClassRegistration-expert: true
@ -213,7 +213,7 @@ ProxyManager-name: Proxy manager
ProxyManager-desc: Plugin used to proxy second class object fields of managed \ ProxyManager-desc: Plugin used to proxy second class object fields of managed \
instances. Must implement org.apache.openjpa.util.ProxyManager. instances. Must implement org.apache.openjpa.util.ProxyManager.
ProxyManager-type: General ProxyManager-type: General
ProxyManager-cat: JDO.Advanced ProxyManager-cat: Persistence.Advanced
ProxyManager-displayorder: 50 ProxyManager-displayorder: 50
ProxyManager-expert: true ProxyManager-expert: true
@ -300,8 +300,8 @@ ConnectionFactory2Properties-expert: true
Optimistic-name: Optimistic transactions Optimistic-name: Optimistic transactions
Optimistic-desc: Selects between optimistic and pessimistic (data store) \ Optimistic-desc: Selects between optimistic and pessimistic (data store) \
transactional modes. transactional modes.
Optimistic-type: JDO Optimistic-type: Persistence
Optimistic-cat: JDO.Transactions Optimistic-cat: Persistence.Transactions
Optimistic-displayorder: 50 Optimistic-displayorder: 50
RetainState-name: Retain values RetainState-name: Retain values
@ -310,8 +310,8 @@ RetainState-desc: If true, then fields in a persistence-capable object that \
transaction commits. Otherwise, persistence-capable objects must \ transaction commits. Otherwise, persistence-capable objects must \
transition to the hollow state upon commit, meaning that subsequent reads \ transition to the hollow state upon commit, meaning that subsequent reads \
will result in a database round-trip. will result in a database round-trip.
RetainState-type: JDO RetainState-type: Persistence
RetainState-cat: JDO.Transactions.Advanced RetainState-cat: Persistence.Transactions.Advanced
RetainState-displayorder: 50 RetainState-displayorder: 50
RestoreState-name: Restore state RestoreState-name: Restore state
@ -320,8 +320,8 @@ RestoreState-desc: If true, then immutable fields in a persistence-capable \
their original values upon a rollback. If set to "all", mutable fields \ 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 \ will also be restored. If false, the values will not be changed upon \
rollback. rollback.
RestoreState-type: JDO RestoreState-type: Persistence
RestoreState-cat: JDO.Transactions.Advanced RestoreState-cat: Persistence.Transactions.Advanced
RestoreState-displayorder: 50 RestoreState-displayorder: 50
AutoDetach-name: Auto detach AutoDetach-name: Auto detach
@ -347,7 +347,7 @@ IgnoreChanges-desc: If false, then OpenJPA must consider modifications, \
deletions, and additions in the current trasnaction when executing a \ deletions, and additions in the current trasnaction when executing a \
query. Else, OpenJPA is free to ignore changes and execute the query \ query. Else, OpenJPA is free to ignore changes and execute the query \
directly against the data store. directly against the data store.
IgnoreChanges-type: JDO IgnoreChanges-type: Persistence
IgnoreChanges-cat: Queries IgnoreChanges-cat: Queries
IgnoreChanges-displayorder: 50 IgnoreChanges-displayorder: 50
@ -355,16 +355,16 @@ NontransactionalRead-name: Non-transactional read
NontransactionalRead-desc: If true, then it is possible to read \ NontransactionalRead-desc: If true, then it is possible to read \
persistent data outside the context of a transaction. Otherwise, a \ persistent data outside the context of a transaction. Otherwise, a \
transaction must be in progress in order read data. transaction must be in progress in order read data.
NontransactionalRead-type: JDO NontransactionalRead-type: Persistence
NontransactionalRead-cat: JDO.Transactions NontransactionalRead-cat: Persistence.Transactions
NontransactionalRead-displayorder: 50 NontransactionalRead-displayorder: 50
NontransactionalWrite-name: Non-transactional write NontransactionalWrite-name: Non-transactional write
NontransactionalWrite-desc: If true, then it is possible to write to \ NontransactionalWrite-desc: If true, then it is possible to write to \
fields of a persistent-nontransactional object when a transaction is not \ fields of a persistent-nontransactional object when a transaction is not \
in progress. If false, such a write will result in an exception. in progress. If false, such a write will result in an exception.
NontransactionalWrite-type: JDO NontransactionalWrite-type: Persistence
NontransactionalWrite-cat: JDO.Transactions NontransactionalWrite-cat: Persistence.Transactions
NontransactionalWrite-displayorder: 50 NontransactionalWrite-displayorder: 50
Multithreaded-name: Multithreaded Multithreaded-name: Multithreaded
@ -372,8 +372,8 @@ Multithreaded-desc: If true, then the application plans to have multiple \
threads simultaneously accessing a single context or object, so measures \ threads simultaneously accessing a single context or object, so measures \
must be taken to ensure that the implementation is thread-safe. Otherwise, \ must be taken to ensure that the implementation is thread-safe. Otherwise, \
the implementation need not address thread safety. the implementation need not address thread safety.
Multithreaded-type: JDO Multithreaded-type: Persistence
Multithreaded-cat: JDO.Optimization Multithreaded-cat: Persistence.Optimization
Multithreaded-displayorder: 50 Multithreaded-displayorder: 50
ConnectionUserName-name: Connection username ConnectionUserName-name: Connection username
@ -435,7 +435,7 @@ ConnectionFactory2-displayorder: 50
PersistenceServer-name: Remote persistence support PersistenceServer-name: Remote persistence support
PersistenceServer-desc: Define the remote persistence server. PersistenceServer-desc: Define the remote persistence server.
PersistenceServer-type: General PersistenceServer-type: General
PersistenceServer-cat: JDO.Remote PersistenceServer-cat: Persistence.Remote
PersistenceServer-displayorder: 50 PersistenceServer-displayorder: 50
PersistenceServer-expert: true PersistenceServer-expert: true
PersistenceServer-interface: org.apache.openjpa.lib.remote.Transport PersistenceServer-interface: org.apache.openjpa.lib.remote.Transport
@ -462,7 +462,7 @@ InverseManager-desc: Plugin used to manage inverse relations during flush. \
Set to true to use the default inverse manager. Custom inverse managers \ Set to true to use the default inverse manager. Custom inverse managers \
must extend org.apache.openjpa.kernel.InverseManager. must extend org.apache.openjpa.kernel.InverseManager.
InverseManager-type: General InverseManager-type: General
InverseManager-cat: JDO.Advanced InverseManager-cat: Persistence.Advanced
InverseManager-displayorder: 50 InverseManager-displayorder: 50
InverseManager-expert: true InverseManager-expert: true
InverseManager-interface: org.apache.openjpa.kernel.InverseManager InverseManager-interface: org.apache.openjpa.kernel.InverseManager
@ -472,7 +472,7 @@ SavepointManager-desc: Plugin used to create and manage savepoints for \
partial rollback/commit support. Defaults to "in-mem". Custom savepoint \ partial rollback/commit support. Defaults to "in-mem". Custom savepoint \
managers must implement org.apache.openjpa.kernel.SavepointManager. managers must implement org.apache.openjpa.kernel.SavepointManager.
SavepointManager-type: General SavepointManager-type: General
SavepointManager-cat: JDO.Advanced SavepointManager-cat: Persistence.Advanced
SavepointManager-displayorder: 50 SavepointManager-displayorder: 50
SavepointManager-expert: true SavepointManager-expert: true
SavepointManager-interface: org.apache.openjpa.kernel.SavepointManager SavepointManager-interface: org.apache.openjpa.kernel.SavepointManager
@ -482,7 +482,7 @@ OrphanedKeyAction-desc: Action to take when OpenJPA discovers an orphaned key \
in the database. May be a custom action implementing \ in the database. May be a custom action implementing \
org.apache.openjpa.event.OrphanedKeyAction. org.apache.openjpa.event.OrphanedKeyAction.
OrphanedKeyAction-type: General OrphanedKeyAction-type: General
OrphanedKeyAction-cat: JDO.Advanced OrphanedKeyAction-cat: Persistence.Advanced
OrphanedKeyAction-displayorder: 50 OrphanedKeyAction-displayorder: 50
OrphanedKeyAction-expert: true OrphanedKeyAction-expert: true
OrphanedKeyAction-interface: org.apache.openjpa.event.OrphanedKeyAction OrphanedKeyAction-interface: org.apache.openjpa.event.OrphanedKeyAction
@ -519,7 +519,7 @@ MetaDataRepository-interface: org.apache.openjpa.meta.MetaDataRepository
Mapping-name: Datastore mapping Mapping-name: Datastore mapping
Mapping-desc: The name of the datastore mapping to use. Mapping-desc: The name of the datastore mapping to use.
Mapping-type: JDO Mapping-type: Persistence
Mapping-cat: Mappings Mapping-cat: Mappings
Mapping-displayorder: 50 Mapping-displayorder: 50
@ -527,7 +527,7 @@ Compatibility-name: Compatibility Information
Compatibility-desc: Details about various compatibiity options for the current \ Compatibility-desc: Details about various compatibiity options for the current \
environment. environment.
Compatibility-type: General Compatibility-type: General
Compatibility-cat: JDO.Advanced Compatibility-cat: Persistence.Advanced
Compatibility-displayorder: 50 Compatibility-displayorder: 50
Compatibility-expert: true Compatibility-expert: true
Compatibility-interface: org.apache.openjpa.conf.Compatibility Compatibility-interface: org.apache.openjpa.conf.Compatibility

View File

@ -398,10 +398,12 @@ public class ConfigurationImpl
try { try {
_pds[i] = getPropertyDescriptor(val); _pds[i] = getPropertyDescriptor(val);
} catch (MissingResourceException mre) { } catch (MissingResourceException mre) {
mre.printStackTrace();
if (failures == null) if (failures == null)
failures = new ArrayList(); failures = new ArrayList();
failures.add(val.getProperty()); failures.add(val.getProperty());
} catch (IntrospectionException ie) { } catch (IntrospectionException ie) {
ie.printStackTrace();
if (failures == null) if (failures == null)
failures = new ArrayList(); failures = new ArrayList();
failures.add(val.getProperty()); failures.add(val.getProperty());
@ -425,8 +427,8 @@ public class ConfigurationImpl
// set up property descriptor // set up property descriptor
PropertyDescriptor pd; PropertyDescriptor pd;
try { try {
pd = new PropertyDescriptor pd = new PropertyDescriptor(Introspector.decapitalize(prop),
(Introspector.decapitalize(prop), getClass()); getClass());
} catch (IntrospectionException ie) { } catch (IntrospectionException ie) {
// if there aren't any methods for this value(i.e., if it's a // if there aren't any methods for this value(i.e., if it's a
// dynamically-added value), then an IntrospectionException will // dynamically-added value), then an IntrospectionException will
@ -707,8 +709,10 @@ public class ConfigurationImpl
String[] prefixes = ProductDerivations.getConfigurationPrefixes(); String[] prefixes = ProductDerivations.getConfigurationPrefixes();
for (int i = 0; i < prefixes.length; i++) { for (int i = 0; i < prefixes.length; i++) {
if (propName.toLowerCase().startsWith(prefixes[i]) if (propName.toLowerCase().startsWith(prefixes[i])
&& propName.length() > prefixes[i].length() && propName.length() > prefixes[i].length() + 1
&& propName.indexOf('.', prefixes[i].length()) == -1) && propName.indexOf('.', prefixes[i].length())
== prefixes[i].length()
&& propName.indexOf('.', prefixes[i].length() + 1) == -1)
return true; return true;
} }
return false; return false;

View File

@ -56,5 +56,6 @@ public class EntityManagerFactoryValue
setAliases(ALIASES); setAliases(ALIASES);
setDefault(ALIASES[0]); setDefault(ALIASES[0]);
setClassName(ALIASES[1]); setClassName(ALIASES[1]);
setScope(getClass());
} }
} }

View File

@ -40,15 +40,6 @@ unnamed-fg: "{0}" declares an unnamed fetch group. All fetch groups \
bad-fg-field: Fetch group "{0}" in type "{1}" includes field "{2}", but \ 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, \ this field is not declared in "{1}", or is not persistent. Currently, \
OpenJPA only supports declared fields in fetch groups. 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 \ not-update-delete-query: Cannot perform an update or delete operation \
on select query: "{0}". on select query: "{0}".
not-select-query: Cannot perform a select on update or delete query: "{0}". not-select-query: Cannot perform a select on update or delete query: "{0}".
@ -73,7 +64,7 @@ illegal-index: The parameter index {0} is invalid. Parameters must be \
integers starting at 1. integers starting at 1.
conf-load: Setting the following properties from "{0}" into configuration: {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}". 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. no-class: No class attribute was specified.
invalid-id-class: Could not load id class "{1}" for type "{0}". 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}". invalid-attr: Could not find property/field with the name "{0}" in type "{1}".
@ -100,3 +91,12 @@ multiple-methods-on-callback-error: Class "{0}" declares method "{1}" as well \
missing-no-arg-constructor: Entity listener class "{0}" must declare a no-arg \ missing-no-arg-constructor: Entity listener class "{0}" must declare a no-arg \
constructor. "AllowsNoArgConstructorCallback" property of MetaDataDefaults \ constructor. "AllowsNoArgConstructorCallback" property of MetaDataDefaults \
can be set to true to ignore this exception. 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