Author: pcl Date: Tue Nov 14 16:45:09 2006 New Revision: 475087 URL: http://svn.apache.org/viewvc?view=rev&rev=475087 Log: realized immediately after committing that the id belongs at the generic Configuration level, not at the OpenJPAConfiguration level.
Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java 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/Configuration.java incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java?view=diff&rev=475087&r1=475086&r2=475087 ============================================================================== --- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java (original) +++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java Tue Nov 14 16:45:09 2006 @@ -1383,22 +1383,4 @@ * configuration. */ public StoreFacadeTypeRegistry getStoreFacadeTypeRegistry(); - - /** - * An environment-specific identifier for this configuration. This - * might correspond to a JPA persistence-unit name, or to some other - * more-unique value available in the current environment. - * - * @since 0.9.7 - */ - public String getId(); - - /** - * An environment-specific identifier for this configuration. This - * might correspond to a JPA persistence-unit name, or to some other - * more-unique value available in the current environment. - * - * @since 0.9.7 - */ - public void setId(String id); } Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java?view=diff&rev=475087&r1=475086&r2=475087 ============================================================================== --- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java (original) +++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java Tue Nov 14 16:45:09 2006 @@ -127,7 +127,6 @@ public ObjectValue orphanedKeyPlugin; public ObjectValue compatibilityPlugin; public QueryCompilationCacheValue queryCompilationCachePlugin; - public StringValue id; // custom values public BrokerFactoryValue brokerFactoryPlugin; @@ -467,8 +466,6 @@ "getQueryCompilationCacheInstance"); addValue(queryCompilationCachePlugin); - addString("Id"); - // initialize supported options that some runtimes may not support supportedOptions.add(OPTION_NONTRANS_READ); supportedOptions.add(OPTION_OPTIMISTIC); @@ -1408,15 +1405,6 @@ return _storeFacadeRegistry; } - public String getId() { - return id.get(); - } - - public void setId(String id) { - assertNotReadOnly(); - this.id.set(id); - } - public void instantiateAll() { super.instantiateAll(); getMetaDataRepositoryInstance(); 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=475087&r1=475086&r2=475087 ============================================================================== --- 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 Nov 14 16:45:09 2006 @@ -557,15 +557,6 @@ QueryCompilationCache-expert: true QueryCompilationCache-interface: java.util.Map -Id-name: Configuration ID -Id-desc: An environment-specific identifier for this configuration. This \ - might correspond to a JPA persistence-unit name, or to some other \ - more-unique value available in the current environment. -Id-type: General -Id-cat: Persistence -Id-displayorder: 50 -Id-expert: true - no-named-cf: use a DataSource bound to JNDI diff-specs: Attempt to configure for multiple specifications. Was configured \ for "{0}". Attempt to now configure for "{1}". This attempt will be \ Modified: incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java?view=diff&rev=475087&r1=475086&r2=475087 ============================================================================== --- incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java (original) +++ incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java Tue Nov 14 16:45:09 2006 @@ -115,6 +115,25 @@ */ public Log getConfigurationLog(); + + /** + * An environment-specific identifier for this configuration. This + * might correspond to a JPA persistence-unit name, or to some other + * more-unique value available in the current environment. + * + * @since 0.9.7 + */ + public String getId(); + + /** + * An environment-specific identifier for this configuration. This + * might correspond to a JPA persistence-unit name, or to some other + * more-unique value available in the current environment. + * + * @since 0.9.7 + */ + public void setId(String id); + /** * Return the [EMAIL PROTECTED] Value} for the given property, or null if none. */ 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=475087&r1=475086&r2=475087 ============================================================================== --- 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 Nov 14 16:45:09 2006 @@ -101,6 +101,7 @@ (ConfigurationImpl.class); public ObjectValue logFactoryPlugin; + public StringValue id; private String _product = null; private boolean _readOnly = false; @@ -146,6 +147,8 @@ logFactoryPlugin.setString(aliases[0]); logFactoryPlugin.setInstantiatingGetter("getLogFactory"); + id = addString("Id"); + if (loadGlobals) loadGlobals(); } @@ -207,6 +210,15 @@ public Log getLog(String category) { return getLogFactory().getLog(category); + } + + public String getId() { + return id.get(); + } + + public void setId(String id) { + assertNotReadOnly(); + this.id.set(id); } /**