You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mp...@apache.org on 2007/08/29 21:38:02 UTC
svn commit: r570908 [1/2] - in /openjpa/trunk: ./ openjpa-all/
openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/
openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/ openjpa-kernel/
openjpa-kernel/src/main/java/org/apache/openjpa/conf/ o...
Author: mprudhom
Date: Wed Aug 29 12:37:59 2007
New Revision: 570908
URL: http://svn.apache.org/viewvc?rev=570908&view=rev
Log:
Merging changes from 1.0.x branch into trunk (from branch point 567935:HEAD)
Added:
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/RuntimeUnenhancedClasssesModes.java
- copied unchanged from r570902, openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/RuntimeUnenhancedClasssesModes.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestDataCachingAndUnenhancedPropertyAccess.java
- copied unchanged from r570902, openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestDataCachingAndUnenhancedPropertyAccess.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestRelationToUnlistedClass.java
- copied unchanged from r570902, openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestRelationToUnlistedClass.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/UnenhancedIdentityIdPropertyAccess.java
- copied unchanged from r570902, openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/UnenhancedIdentityIdPropertyAccess.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/UnenhancedUnlistedClass.java
- copied unchanged from r570902, openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/UnenhancedUnlistedClass.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/UnenhancedUnlistedReferer.java
- copied unchanged from r570902, openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/UnenhancedUnlistedReferer.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/IdentityIdClass.java
- copied unchanged from r570902, openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/IdentityIdClass.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestAutoIncrementAndDataCaching.java
- copied unchanged from r570902, openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestAutoIncrementAndDataCaching.java
Modified:
openjpa/trunk/openjpa-all/pom.xml
openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java
openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java
openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCEnhancerAgent.java
openjpa/trunk/openjpa-kernel/pom.xml
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingFetchConfiguration.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfiguration.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java
openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties
openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties
openjpa/trunk/openjpa-persistence-jdbc/pom.xml
openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java
openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementConfiguration.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java
openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java
openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java
openjpa/trunk/openjpa-project/CHANGES.txt
openjpa/trunk/openjpa-project/RELEASE-NOTES.html
openjpa/trunk/openjpa-project/assembly.xml
openjpa/trunk/openjpa-project/pom.xml
openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
openjpa/trunk/pom.xml
Modified: openjpa/trunk/openjpa-all/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-all/pom.xml?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-all/pom.xml (original)
+++ openjpa/trunk/openjpa-all/pom.xml Wed Aug 29 12:37:59 2007
@@ -31,7 +31,7 @@
<version>1.1.0-SNAPSHOT</version>
</parent>
<properties>
- <scm.dir>svn.apache.org/repos/asf/openjpa/trunk/openjpa-all</scm.dir>
+ <scm.dir>svn.apache.org/repos/asf/openjpa/branches/1.0.x/openjpa-all</scm.dir>
</properties>
<scm>
Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java Wed Aug 29 12:37:59 2007
@@ -32,8 +32,10 @@
import org.apache.openjpa.jdbc.sql.SQLExceptions;
import org.apache.openjpa.kernel.OpenJPAStateManager;
import org.apache.openjpa.lib.util.Localizer;
+import org.apache.openjpa.util.ApplicationIds;
import org.apache.openjpa.util.OpenJPAException;
import org.apache.openjpa.util.OptimisticException;
+import org.apache.openjpa.meta.ClassMetaData;
/**
* Basic prepared statement manager implementation.
@@ -119,6 +121,8 @@
mapping.assertJoinable(autoAssign[i]).setAutoAssignedValue(sm,
_store, autoAssign[i], val);
}
+ sm.setObjectId(
+ ApplicationIds.create(sm.getPersistenceCapable(), mapping));
}
}
Modified: openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java (original)
+++ openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java Wed Aug 29 12:37:59 2007
@@ -23,19 +23,23 @@
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.apache.openjpa.conf.OpenJPAConfiguration;
import org.apache.openjpa.lib.log.Log;
import org.apache.openjpa.lib.util.BytecodeWriter;
import org.apache.openjpa.lib.util.JavaVersions;
import org.apache.openjpa.lib.util.Localizer;
+import org.apache.openjpa.lib.util.Localizer.Message;
import org.apache.openjpa.meta.ClassMetaData;
import org.apache.openjpa.meta.FieldMetaData;
import org.apache.openjpa.meta.JavaTypes;
import org.apache.openjpa.util.GeneratedClasses;
+import org.apache.openjpa.util.ImplHelper;
import org.apache.openjpa.util.InternalException;
import org.apache.openjpa.util.UserException;
import serp.bytecode.BCClass;
@@ -78,18 +82,26 @@
return null;
if (classes.size() == 0)
return Collections.EMPTY_LIST;
- if (!conf.getRuntimeClassOptimization()) {
+
+ Log log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE);
+ if (conf.getRuntimeUnenhancedClassesConstant()
+ != RuntimeUnenhancedClasssesModes.SUPPORTED) {
Collection unenhanced = new ArrayList();
for (Class cls : classes)
if (!PersistenceCapable.class.isAssignableFrom(cls))
unenhanced.add(cls);
- if (unenhanced.size() > 0)
- throw new UserException(_loc.get(
- "runtime-optimization-disabled", unenhanced));
+ if (unenhanced.size() > 0) {
+ Message msg = _loc.get("runtime-optimization-disabled",
+ unenhanced);
+ if (conf.getRuntimeUnenhancedClassesConstant()
+ == RuntimeUnenhancedClasssesModes.WARN)
+ log.warn(msg);
+ else
+ throw new UserException(msg);
+ }
return null;
}
- Log log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE);
boolean redefine = ClassRedefiner.canRedefineClasses();
if (redefine)
log.info(_loc.get("enhance-and-subclass-no-redef-start",
@@ -101,6 +113,7 @@
final Map<Class, byte[]> map = new HashMap<Class, byte[]>();
final List subs = new ArrayList(classes.size());
final List ints = new ArrayList(classes.size());
+ Set<Class> unspecified = null;
for (Iterator iter = classes.iterator(); iter.hasNext(); ) {
final Class cls = (Class) iter.next();
final PCEnhancer enhancer = new PCEnhancer(conf, cls);
@@ -123,6 +136,9 @@
// reconfiguration at the end of this method.
configureMetaData(enhancer.getMetaData(), conf, redefine, false);
+ unspecified = collectRelatedUnspecifiedTypes(enhancer.getMetaData(),
+ classes, unspecified);
+
enhancer.run();
try {
enhancer.record();
@@ -132,6 +148,10 @@
}
}
+ if (unspecified != null && !unspecified.isEmpty())
+ throw new UserException(_loc.get("unspecified-unenhanced-types",
+ classes, unspecified));
+
ClassRedefiner.redefineClasses(conf, map);
for (Class cls : map.keySet()) {
setIntercepting(conf, envLoader, cls);
@@ -143,6 +163,41 @@
setIntercepting(conf, envLoader, cls);
return subs;
+ }
+
+ private static Set<Class> collectRelatedUnspecifiedTypes(ClassMetaData meta,
+ Collection<? extends Class> classes, Set<Class> unspecified) {
+ unspecified = collectUnspecifiedType(meta.getPCSuperclass(), classes,
+ unspecified);
+
+ for (FieldMetaData fmd : meta.getFields()) {
+ if (fmd.isTransient())
+ continue;
+ if (fmd.isTypePC())
+ unspecified = collectUnspecifiedType(fmd.getType(), classes,
+ unspecified);
+ if (fmd.getElement() != null && fmd.getElement().isTypePC())
+ unspecified = collectUnspecifiedType(fmd.getElement().getType(),
+ classes, unspecified);
+ if (fmd.getKey() != null && fmd.getKey().isTypePC())
+ unspecified = collectUnspecifiedType(fmd.getKey().getType(),
+ classes, unspecified);
+ if (fmd.getValue() != null && fmd.getValue().isTypePC())
+ unspecified = collectUnspecifiedType(fmd.getValue().getType(),
+ classes, unspecified);
+ }
+ return unspecified;
+ }
+
+ private static Set<Class> collectUnspecifiedType(Class cls,
+ Collection<? extends Class> classes, Set<Class> unspecified) {
+ if (cls != null && !classes.contains(cls)
+ && !ImplHelper.isManagedType(null, cls)) {
+ if (unspecified == null)
+ unspecified = new HashSet<Class>();
+ unspecified.add(cls);
+ }
+ return unspecified;
}
private static void configureMetaData(OpenJPAConfiguration conf,
Modified: openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCEnhancerAgent.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCEnhancerAgent.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCEnhancerAgent.java (original)
+++ openjpa/trunk/openjpa-kernel-5/src/main/java/org/apache/openjpa/enhance/PCEnhancerAgent.java Wed Aug 29 12:37:59 2007
@@ -26,7 +26,6 @@
import org.apache.openjpa.lib.conf.Configurations;
import org.apache.openjpa.lib.util.J2DoPrivHelper;
import org.apache.openjpa.lib.util.Options;
-import org.apache.openjpa.lib.util.TemporaryClassLoader;
import org.apache.openjpa.util.ClassResolver;
/**
@@ -45,13 +44,13 @@
* <p>By default, if specified, the agent runs the OpenJPA enhancer on
* all classes listed in the first persistence unit as they are loaded,
* and redefines all other persistent classes when they are encountered.
- * To disable enhancement and rely solely on the redefinition logic, set
- * the RuntimeEnhancement flag to false. To disable redefinition and rely
- * solely on pre-deployment or runtime enhancement, set the
- * RuntimeRedefinition flag to false.
+ * To disable enhancement at class-load time and rely solely on the
+ * redefinition logic, set the ClassLoadEnhancement flag to false. To
+ * disable redefinition and rely solely on pre-deployment or class-load
+ * enhancement, set the RuntimeRedefinition flag to false.
* </p>
*
- * <p><code>java -javaagent:openjpa.jar=RuntimeEnhancement=false</code></p>
+ * <p><code>java -javaagent:openjpa.jar=ClassLoadEnhancement=false</code></p>
*
* @author Abe White
* @author Patrick Linskey
@@ -62,18 +61,23 @@
Options opts = Configurations.parseProperties(args);
if (opts.getBooleanProperty(
+ "ClassLoadEnhancement", "classLoadEnhancement", true))
+ registerClassLoadEnhancer(inst, opts);
+
+ // Deprecated property setting
+ if (opts.getBooleanProperty(
"RuntimeEnhancement", "runtimeEnhancement", true))
- registerRuntimeEnhancer(inst, opts);
+ registerClassLoadEnhancer(inst, opts);
- if (opts.getBooleanProperty("RuntimeRedefinition",
- "runtimeRedefinition", true)) {
+ if (opts.getBooleanProperty(
+ "RuntimeRedefinition", "runtimeRedefinition", true)) {
InstrumentationFactory.setInstrumentation(inst);
} else {
InstrumentationFactory.setDynamicallyInstallAgent(false);
}
}
- private static void registerRuntimeEnhancer(Instrumentation inst,
+ private static void registerClassLoadEnhancer(Instrumentation inst,
Options opts) {
OpenJPAConfiguration conf = new OpenJPAConfigurationImpl();
Configurations.populateConfiguration(conf, opts);
Modified: openjpa/trunk/openjpa-kernel/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/pom.xml?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/pom.xml (original)
+++ openjpa/trunk/openjpa-kernel/pom.xml Wed Aug 29 12:37:59 2007
@@ -67,12 +67,6 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
- <version>1.0.1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1</version>
<scope>compile</scope>
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java Wed Aug 29 12:37:59 2007
@@ -1389,31 +1389,63 @@
public StoreFacadeTypeRegistry getStoreFacadeTypeRegistry();
/**
- * Return the {@link org.apache.openjpa.event.BrokerFactoryEventManager} associated with this
- * configuration.
+ * Return the {@link org.apache.openjpa.event.BrokerFactoryEventManager}
+ * associated with this configuration.
*
* @since 1.0.0
*/
public BrokerFactoryEventManager getBrokerFactoryEventManager();
/**
- * Whether or not runtime class optimization is enabled.
+ * Specifies how OpenJPA handles unenhanced types. Possible values are:
+ * <ul>
+ * <li><code>enabled</code>: Runtime optimization of persistent types
+ * is available. This is the default</li>
+ * <li><code>disabled</code>: Runtime optimization of persistent types
+ * is not available. An exception will be thrown if the system loads with
+ * persistent types that are not enhanced.</li>
+ * <li><code>warn</code>: Runtime optimization of persistent types is
+ * not available, but no exception will be thrown initially. A warning will
+ * be logged instead. It is likely that the system will fail at a later
+ * point. This might be suitable for environments with complex classloader
+ * configurations.</li>
+ * </ul>
*
* @since 1.0.0
*/
- public boolean getRuntimeClassOptimization();
+ public String getRuntimeUnenhancedClasses();
/**
- * Whether or not runtime class optimization is enabled.
+ * Specifies how OpenJPA handles unenhanced types.
*
+ * @see {@link #getRuntimeUnenhancedClasses()}
* @since 1.0.0
*/
- public void setRuntimeClassOptimization(Boolean enabled);
+ public void setRuntimeUnenhancedClasses(String mode);
/**
- * Wrapper for JCA usage of {@link #setRetryClassRegistration(boolean)}.
+ * Return the runtime class optimization setting as one of the
+ * following symbolic constants:
+ * <ul>
+ * <li>{@link RuntimeClassOptimizationModes#RUNTIME_OPT_ENABLED}</li>
+ * <li>{@link RuntimeClassOptimizationModes#RUNTIME_OPT_DISABLED}</li>
+ * <li>{@link RuntimeClassOptimizationModes#RUNTIME_OPT_WARN}</li>
+ * </ul>
*
* @since 1.0.0
*/
- public void setRuntimeClassOptimization(boolean enabled);
+ public int getRuntimeUnenhancedClassesConstant();
+
+ /**
+ * Set the runtime class optimization setting as one of the
+ * following symbolic constants:
+ * <ul>
+ * <li>{@link RuntimeClassOptimizationModes#RUNTIME_OPT_ENABLED}</li>
+ * <li>{@link RuntimeClassOptimizationModes#RUNTIME_OPT_DISABLED}</li>
+ * <li>{@link RuntimeClassOptimizationModes#RUNTIME_OPT_WARN}</li>
+ * </ul>
+ *
+ * @since 1.0.0
+ */
+ public void setRuntimeUnenhancedClasses(int mode);
}
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java Wed Aug 29 12:37:59 2007
@@ -53,6 +53,7 @@
import org.apache.openjpa.util.ImplHelper;
import org.apache.openjpa.util.ProxyManager;
import org.apache.openjpa.util.StoreFacadeTypeRegistry;
+import org.apache.openjpa.enhance.RuntimeUnenhancedClasssesModes;
/**
* Implementation of the {@link OpenJPAConfiguration} interface.
@@ -131,7 +132,7 @@
public ObjectValue orphanedKeyPlugin;
public ObjectValue compatibilityPlugin;
public QueryCompilationCacheValue queryCompilationCachePlugin;
- public BooleanValue runtimeClassOptimization;
+ public IntValue runtimeUnenhancedClasses;
// custom values
public BrokerFactoryValue brokerFactoryPlugin;
@@ -480,9 +481,18 @@
"getQueryCompilationCacheInstance");
addValue(queryCompilationCachePlugin);
- runtimeClassOptimization = addBoolean("RuntimeClassOptimization");
- runtimeClassOptimization.setDefault("true");
- runtimeClassOptimization.set(true);
+ runtimeUnenhancedClasses = addInt("RuntimeUnenhancedClasses");
+ runtimeUnenhancedClasses.setAliases(new String[] {
+ "supported", String.valueOf(
+ RuntimeUnenhancedClasssesModes.SUPPORTED),
+ "unsupported", String.valueOf(
+ RuntimeUnenhancedClasssesModes.UNSUPPORTED),
+ "warn", String.valueOf(
+ RuntimeUnenhancedClasssesModes.WARN),
+ });
+ runtimeUnenhancedClasses.setDefault("supported");
+ runtimeUnenhancedClasses.setString("supported");
+ runtimeUnenhancedClasses.setAliasListComprehensive(true);
// initialize supported options that some runtimes may not support
supportedOptions.add(OPTION_NONTRANS_READ);
@@ -1427,17 +1437,22 @@
return _brokerFactoryEventManager;
}
- public boolean getRuntimeClassOptimization() {
- return runtimeClassOptimization.get();
+ public String getRuntimeUnenhancedClasses() {
+ return runtimeUnenhancedClasses.getString();
}
- public void setRuntimeClassOptimization(Boolean enabled) {
- setRuntimeClassOptimization(enabled.booleanValue());
+ public int getRuntimeUnenhancedClassesConstant() {
+ return runtimeUnenhancedClasses.get();
}
- public void setRuntimeClassOptimization(boolean enabled) {
+ public void setRuntimeUnenhancedClasses(int mode) {
assertNotReadOnly();
- runtimeClassOptimization.set(enabled);
+ runtimeUnenhancedClasses.set(mode);
+ }
+
+ public void setRuntimeUnenhancedClasses(String mode) {
+ assertNotReadOnly();
+ runtimeUnenhancedClasses.setString(mode);
}
public void instantiateAll() {
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java Wed Aug 29 12:37:59 2007
@@ -380,6 +380,9 @@
return false;
if (!_ctx.getPopulateDataCache())
return true;
+ // Do not load changes into cache if the instance has been flushed
+ if (sm.isFlushed())
+ return true;
// make sure that we're not trying to cache an old version
cache.writeLock();
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java Wed Aug 29 12:37:59 2007
@@ -109,7 +109,7 @@
if (qk == null)
return null;
FetchConfiguration fetch = getContext().getFetchConfiguration();
- if (!fetch.getEnlistInQueryCache())
+ if (!fetch.getQueryCacheEnabled())
return null;
if (fetch.getReadLockLevel() > LockLevels.LOCK_NONE)
return null;
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java Wed Aug 29 12:37:59 2007
@@ -467,7 +467,8 @@
} catch (OpenJPAException ke) {
throw ke;
} catch (Exception e) {
- throw new GeneralException(e);
+ throw new GeneralException(_loc.get("enhance-error",
+ _managedType.getType().getName(), e.getMessage()), e);
}
}
@@ -2736,7 +2737,10 @@
} catch (Throwable t) {
// last-chance catch for bug #283 (which can happen
// in a variety of ClassLoading environments)
- _log.warn(_loc.get("enhance-uid-access", _meta), t);
+ if (_log.isTraceEnabled())
+ _log.warn(_loc.get("enhance-uid-access", _meta), t);
+ else
+ _log.warn(_loc.get("enhance-uid-access", _meta));
}
// if we couldn't access the serialVersionUID, we will have to
@@ -3672,10 +3676,13 @@
* attribute name for the backing field <code>name</code>.
*/
private String fromBackingFieldName(String name) {
- if (_meta.getAccessType() == ClassMetaData.ACCESS_PROPERTY
+ // meta is null when doing persistence-aware enhancement
+ if (_meta != null
+ && _meta.getAccessType() == ClassMetaData.ACCESS_PROPERTY
&& _fieldsToAttrs.containsKey(name))
- name = (String) _fieldsToAttrs.get(name);
- return name;
+ return (String) _fieldsToAttrs.get(name);
+ else
+ return name;
}
/**
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingFetchConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingFetchConfiguration.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingFetchConfiguration.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingFetchConfiguration.java Wed Aug 29 12:37:59 2007
@@ -183,17 +183,17 @@
}
}
- public boolean getEnlistInQueryCache() {
+ public boolean getQueryCacheEnabled() {
try {
- return _fetch.getEnlistInQueryCache();
+ return _fetch.getQueryCacheEnabled();
} catch (RuntimeException re) {
throw translate(re);
}
}
- public FetchConfiguration setEnlistInQueryCache(boolean cache) {
+ public FetchConfiguration setQueryCacheEnabled(boolean cache) {
try {
- _fetch.setEnlistInQueryCache(cache);
+ _fetch.setQueryCacheEnabled(cache);
return this;
} catch (RuntimeException re) {
throw translate(re);
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfiguration.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfiguration.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfiguration.java Wed Aug 29 12:37:59 2007
@@ -129,14 +129,14 @@
* returns <code>false</code>, query caching will not be used
* even if the datacache plugin is installed.
*/
- public boolean getEnlistInQueryCache();
+ public boolean getQueryCacheEnabled();
/**
* Control whether or not query caching is enabled. This has no effect
* if the datacache plugin is not installed, or if the query cache size
* is set to zero.
*/
- public FetchConfiguration setEnlistInQueryCache(boolean cache);
+ public FetchConfiguration setQueryCacheEnabled(boolean cache);
/**
* The query automatic flush configuration.
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/FetchConfigurationImpl.java Wed Aug 29 12:37:59 2007
@@ -150,7 +150,7 @@
public void copy(FetchConfiguration fetch) {
setFetchBatchSize(fetch.getFetchBatchSize());
setMaxFetchDepth(fetch.getMaxFetchDepth());
- setEnlistInQueryCache(fetch.getEnlistInQueryCache());
+ setQueryCacheEnabled(fetch.getQueryCacheEnabled());
setFlushBeforeQueries(fetch.getFlushBeforeQueries());
setLockTimeout(fetch.getLockTimeout());
clearFetchGroups();
@@ -191,11 +191,11 @@
return this;
}
- public boolean getEnlistInQueryCache() {
+ public boolean getQueryCacheEnabled() {
return _state.queryCache;
}
- public FetchConfiguration setEnlistInQueryCache(boolean cache) {
+ public FetchConfiguration setQueryCacheEnabled(boolean cache) {
_state.queryCache = cache;
return this;
}
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java Wed Aug 29 12:37:59 2007
@@ -580,7 +580,7 @@
// Throw exception if field already has a value assigned.
// @GeneratedValue overrides POJO initial values and setter methods
- if (!isDefaultValue(field) && !fmd.is_generated())
+ if (!isDefaultValue(field) && !fmd.isValueGenerated())
throw new InvalidStateException(_loc.get(
"existing-value-override-excep", fmd.getFullName(false)));
@@ -591,7 +591,7 @@
// for other fields just assign the field or flush if needed
if (_broker.getStoreManager().assignField(this, field, preFlushing)) {
- fmd.set_generated(true);
+ fmd.setValueGenerated(true);
return true;
}
if (!preFlushing)
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java Wed Aug 29 12:37:59 2007
@@ -2051,11 +2051,11 @@
}
}
- public boolean is_generated() {
+ public boolean isValueGenerated() {
return _generated;
}
- public void set_generated(boolean _generated) {
- this._generated = _generated;
+ public void setValueGenerated(boolean generated) {
+ this._generated = generated;
}
}
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java Wed Aug 29 12:37:59 2007
@@ -448,7 +448,7 @@
.getFullName(false)));
// Assign the generated value
if (store.assignField(sm, pks[i].getIndex(), preFlush))
- pks[i].set_generated(true);
+ pks[i].setValueGenerated(true);
else
return false;
}
Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java Wed Aug 29 12:37:59 2007
@@ -30,6 +30,7 @@
import org.apache.openjpa.enhance.StateManager;
import org.apache.openjpa.enhance.ManagedInstanceProvider;
import org.apache.openjpa.enhance.ReflectingPersistenceCapable;
+import org.apache.openjpa.enhance.RuntimeUnenhancedClasssesModes;
import org.apache.openjpa.kernel.FetchConfiguration;
import org.apache.openjpa.kernel.LockManager;
import org.apache.openjpa.kernel.OpenJPAStateManager;
@@ -216,7 +217,8 @@
public static boolean isManagedType(OpenJPAConfiguration conf, Class type) {
return (PersistenceCapable.class.isAssignableFrom(type)
|| (type != null
- && (conf == null || conf.getRuntimeClassOptimization())
+ && (conf == null || conf.getRuntimeUnenhancedClassesConstant()
+ == RuntimeUnenhancedClasssesModes.SUPPORTED)
&& PCRegistry.isRegistered(type)));
}
Modified: openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties (original)
+++ openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/conf/localizer.properties Wed Aug 29 12:37:59 2007
@@ -541,11 +541,12 @@
Compatibility-expert: true
Compatibility-interface: org.apache.openjpa.conf.Compatibility
-RuntimeClassOptimization-name: Runtime class optimization
-RuntimeClassOptimization-desc: Either "true" or "false".
-RuntimeClassOptimization-type: General
-RuntimeClassOptimization-cat: Optimization
-RuntimeClassOptimization-displayorder: 50
+RuntimeUnenhancedClasses-name: Runtime unenhanced classes
+RuntimeUnenhancedClasses-desc: Either "supported", "unsupported", or "warn". \
+ Defaults to "supported".
+RuntimeUnenhancedClasses-type: General
+RuntimeUnenhancedClasses-cat: Optimization
+RuntimeUnenhancedClasses-displayorder: 50
no-named-cf: use a DataSource bound to JNDI
diff-specs: Attempt to configure for multiple specifications. Was configured \
Modified: openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties (original)
+++ openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties Wed Aug 29 12:37:59 2007
@@ -194,4 +194,8 @@
lazily loaded, but lazy loading is not available for classes that use field\
access when not running the OpenJPA enhancer or when dynamic class \
redefinition is not available.
-no-accessor: Could not find method called {0} in type {1}.
\ No newline at end of file
+no-accessor: Could not find method called {0} in type {1}.
+unspecified-unenhanced-types: One or more of the types in {0} have relations \
+ to other unenhanced types that were not specified. These unspecified types \
+ are: {1}
+enhance-error: An error occurred while enhancing {0}. Exception message: {1}
\ No newline at end of file
Modified: openjpa/trunk/openjpa-persistence-jdbc/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/pom.xml?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/pom.xml (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/pom.xml Wed Aug 29 12:37:59 2007
@@ -60,7 +60,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>-Xmx500M</argLine>
+ <argLine>-Xmx500m</argLine>
<systemProperties>
<property>
<name>openjpa.Log</name>
Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlan.java Wed Aug 29 12:37:59 2007
@@ -136,7 +136,7 @@
public JDBCFetchPlan removeFields(String... fields);
public JDBCFetchPlan removeFields(Collection fields);
public JDBCFetchPlan resetFetchGroups();
- public JDBCFetchPlan setEnlistInQueryResultCache(boolean cache);
+ public JDBCFetchPlan setQueryResultCacheEnabled(boolean cache);
public JDBCFetchPlan setFetchBatchSize(int fetchBatchSize);
public JDBCFetchPlan setLockTimeout(int timeout);
public JDBCFetchPlan setMaxFetchDepth(int depth);
Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCFetchPlanImpl.java Wed Aug 29 12:37:59 2007
@@ -225,8 +225,8 @@
}
@Override
- public JDBCFetchPlan setEnlistInQueryResultCache(boolean cache) {
- return (JDBCFetchPlan) super.setEnlistInQueryResultCache(cache);
+ public JDBCFetchPlan setQueryResultCacheEnabled(boolean cache) {
+ return (JDBCFetchPlan) super.setQueryResultCacheEnabled(cache);
}
@Override
Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementConfiguration.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementConfiguration.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementConfiguration.java Wed Aug 29 12:37:59 2007
@@ -29,7 +29,7 @@
public void testEnhancementConfiguration() {
try {
emf = createEMF(
- "openjpa.RuntimeClassOptimization", "false",
+ "openjpa.RuntimeUnenhancedClasses", "unsupported",
UnenhancedFieldAccess.class, CLEAR_TABLES);
assertFalse(ImplHelper.isManagedType(emf.getConfiguration(),
UnenhancedFieldAccess.class));
@@ -38,7 +38,8 @@
"that depends on unenhanced types but disables runtime" +
"redefinition.");
} catch (Exception e) {
- // expected
+ assertTrue(e.getMessage().contains(
+ "This configuration disallows runtime optimization"));
}
}
}
Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/PersistenceTestCase.java Wed Aug 29 12:37:59 2007
@@ -88,6 +88,10 @@
createEntityManagerFactory("test", map);
}
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
/**
* Safely close the given factory.
*/
Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java Wed Aug 29 12:37:59 2007
@@ -49,7 +49,9 @@
/**
* Closes the entity manager factory.
*/
- public void tearDown() {
+ public void tearDown() throws Exception {
+ super.tearDown();
+
if (emf == null)
return;
Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMTestCase.java Wed Aug 29 12:37:59 2007
@@ -48,7 +48,7 @@
}
@Override
- public void tearDown() {
+ public void tearDown() throws Exception {
rollback();
close();
super.tearDown();
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlan.java Wed Aug 29 12:37:59 2007
@@ -88,7 +88,7 @@
*
* @since 1.0.0
*/
- public boolean isEnlistInQueryResultCache();
+ public boolean getQueryResultCacheEnabled();
/**
* Control whether or not query caching is enabled. This has no effect
@@ -97,7 +97,7 @@
*
* @since 1.0.0
*/
- public FetchPlan setEnlistInQueryResultCache(boolean cache);
+ public FetchPlan setQueryResultCacheEnabled(boolean cache);
/**
* Returns the names of the fetch groups that this component will use
Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/FetchPlanImpl.java Wed Aug 29 12:37:59 2007
@@ -82,12 +82,12 @@
return this;
}
- public boolean isEnlistInQueryResultCache() {
- return _fetch.getEnlistInQueryCache();
+ public boolean getQueryResultCacheEnabled() {
+ return _fetch.getQueryCacheEnabled();
}
- public FetchPlan setEnlistInQueryResultCache(boolean cache) {
- _fetch.setEnlistInQueryCache(cache);
+ public FetchPlan setQueryResultCacheEnabled(boolean cache) {
+ _fetch.setQueryCacheEnabled(cache);
return this;
}
Modified: openjpa/trunk/openjpa-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/CHANGES.txt?rev=570908&r1=570907&r2=570908&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/CHANGES.txt (original)
+++ openjpa/trunk/openjpa-project/CHANGES.txt Wed Aug 29 12:37:59 2007
@@ -1,88 +1,315 @@
-Changes in OpenJPA 0.9.7
+ Release Notes for OpenJPA
-Additional information on a specific change can be found in the OpenJPA
-project's issue tracker at http://issues.apache.org/jira/browse/OPENJPA
+ * Overview
+ * License
+ * Prerequisites
+ * Documentation
+ * Getting Involved
+ * Bugs
+ * Improvements
+ * New Features
+ * Task
+ * Test
-** Bugs
- * [OPENJPA-16] - NPE in createQuery for EJB QL with nested correlated subqueries
- * [OPENJPA-21] - Time is missing from list of mutable classes.
- * [OPENJPA-22] - locate & substring queries fail both db2 & derby, cannot use parameter markers in expression ?-?
- * [OPENJPA-23] - -418 sqlexception using DB2 and EJB QL with SQRT or MOD
- * [OPENJPA-24] - Allow OpenJPA to be extensible
- * [OPENJPA-25] - Incorrect SQL generated for queries involving more than one AbstractSchemaNames, generated SQL FROM clause is missing 'Table alias'
- * [OPENJPA-35] - In-memory Delete operation fails with active DataCache
- * [OPENJPA-41] - transforming classes doesn't work
- * [OPENJPA-48] - parsing error - cast of subselect does not work
- * [OPENJPA-50] - bad sql pushdown, cast changes datatype
- * [OPENJPA-53] - bad sql pushdown for nested subselects, missing nested subselect
- * [OPENJPA-54] - bad sql pushdown, should use all syntax
- * [OPENJPA-56] - in derby concat with input parameter needs a cast, otherwise becomes long varchar and some operations do not work
- * [OPENJPA-60] - Specifying the wrong persistence implementation in persistence.xml leads to misleading error message
- * [OPENJPA-62] - Ejbql join queries show invalid null Entities when run in a new persistence context where no entity instances exist.
- * [OPENJPA-71] - Caching primitive array types consumes excessive memory
- * [OPENJPA-77] - Problems in default setting in DB2Dictionary , also missing support for DB2 z/OS platforms
- * [OPENJPA-80] - Bad Escaping for LIKE in MySQL
- * [OPENJPA-98] - Java deadlock when insert in t1 and find in t2 when using IBM JVM 1.5.0
- * [OPENJPA-100] - <jar-file> entries failing to be processed for persistence unit rooted in an EAR
- * [OPENJPA-102] - JTA transaction rollback, nonexistant instances, transactional persistence context => failures during afterCompletion() and close()
- * [OPENJPA-103] - Default Listeners not being processed correctly
- * [OPENJPA-104] - OpenJPA does not detach instances on rollback()
- * [OPENJPA-107] - @SqlResultSetMappings fails in mapping tool with java.lang.ArrayStoreException
- * [OPENJPA-108] - @AttributeOverrides fails in mapping tool with java.lang.ArrayStoreException
- * [OPENJPA-109] - every NativeQuery using SqlResultSetMapping fails at runtime with There is no query result mapping for "null" with name "xxx" when the entity is persisted in a different method than the method doing the query.
- * [OPENJPA-110] - Every NamedNativeQuery using ResultSetMapping fails at runtime with class cast exception when try to iterate over list<Some Entity>
- * [OPENJPA-111] - native queries fail when use named parameters
- * [OPENJPA-115] - Bottleneck(s) with using OpenJPA in a Container-managed environment
- * [OPENJPA-116] - EntityManager.getDelegate should throw an IllegalStateException
- * [OPENJPA-118] - AutoDetach property has no effect
- * [OPENJPA-119] - EntityManager.clear() should not implicitly invoke the flush operation
- * [OPENJPA-121] - Table name defaults to the class name instead of the entity name
- * [OPENJPA-122] - EntityManager does not throw exceptions after close() in required cases
- * [OPENJPA-132] - java.lang.NoSuchMethodError for entity with ID of type java.sql.Date
- * [OPENJPA-133] - Can't find non-public callback methods with superclass or interface parameters
- * [OPENJPA-134] - Extra unneeded SQL joins for OneToMany relationship with fetch type EAGER
- * [OPENJPA-139] - PersistenceException merging an entity with a Calendar field.
- * [OPENJPA-140] - Wrong package name in test classes
- * [OPENJPA-142] - Entity name is ignored when specified in the orm.xml file
- * [OPENJPA-144] - JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.
- * [OPENJPA-146] - Entity enhancement fails while using EmbeddedId on a MappedSuperclass
- * [OPENJPA-150] - @Column in @AttributeOverride not honoring table attribute that maps to a secondary table in mappedsuperclass entity
- * [OPENJPA-154] - OptimisticLockException working with Savepoints
- * [OPENJPA-155] - java.lang.ArrayIndexOutOfBoundsException during commit
- * [OPENJPA-157] - NullPointerException when running query with null parameter
- * [OPENJPA-162] - @OrderBy on @OneToMany does not allow ordering by @Id value
- * [OPENJPA-174] - error when find()'ing an abstract class
- * [OPENJPA-175] - Eager selects by PagingResultObjectProvider may not use the FetchBatchSize
- * [OPENJPA-179] - Schemas defined in orm.xml are only applied when a name is also specified.
- * [OPENJPA-181] - ClassCastException when executing bulk delete on an entity that owns a OneToOne with a Cascade.DELETE when DataCache is on
- * [OPENJPA-185] - optional attribute is not overriden by xml descriptor
- * [OPENJPA-186] - Build failure of OpenJPA sources from trunk
- * [OPENJPA-202] - after invoking LRS processing in a client by calling an @LRS annotated relationship, the next em.clear()/em.close() gets org.apache.openjpa.persistence.InvalidStateException: You cannot transfer large result set fields from one object or field to another
- * [OPENJPA-208] - NoResultException and NonUniqueResultException are not thrown when expected
- * [OPENJPA-214] - Need to support floating point primary keys
-
-** Improvements
- * [OPENJPA-10] - persistence unit name should be default diagnostic context for standard OpenJPA log impl
- * [OPENJPA-37] - Support ant typedefs for OpenJPA tasks
- * [OPENJPA-55] - Allow executeUpdate() invocations on native queries
- * [OPENJPA-57] - persistence_1_0.xsd is missing
- * [OPENJPA-63] - Better pessimistic lock support for DB2 v8.2+
- * [OPENJPA-151] - Added field in enhanced vesrion of a class is not serialized. Hence the change in detached+serialized instances is not registered under certain conditions.
- * [OPENJPA-153] - WebSphere and non-jta-data-source and default ManagedRuntime
- * [OPENJPA-158] - OpenJPA logs overly-verbose at INFO level
- * [OPENJPA-161] - Overuse of synchronization in AbstractBrokerFactory
- * [OPENJPA-166] - Track the reason why a setRollbackOnly invocation was made
- * [OPENJPA-176] - Exception prefixes should be human-readable
- * [OPENJPA-196] - Ease the restrictions on forcing a matche between the number of declared and assigned positional parameters
-
-** New Features
- * [OPENJPA-92] - Support for H2 Database Engine
- * [OPENJPA-93] - Sequence generation in a JTA environment should not require non-JTA datasource
- * [OPENJPA-94] - Allow MappingTool and persistence.xml to support drop-create for database schema
- * [OPENJPA-182] - db2 update lock syntax WITH <isolation> USE AND KEEP UPDATE LOCKS
+Overview
-** Tasks
- * [OPENJPA-36] - Add cwiki url to incubator status page
+ These notes describe the difference between OpenJPA release 1.0.0 and the
+ preceding releases, 0.9.6 and 0.9.7. 1.0.0 is the first major release
+ since OpenJPA graduated to an Apache top level project (TLP), and contains
+ many new features and bugfixes.
-** Tests
- * [OPENJPA-40] - Testing OpenJPA and Spring integration fails
+ OpenJPA is a feature-rich implementation of the persistence part of Java
+ Community Process JSR-220 (Enterprise JavaBeans 3.0), which is known as
+ the Java Persistence API (JPA). OpenJPA can be used as a stand-alone POJO
+ persistence layer, or it can be integrated into any EJB3.0 compliant
+ container and many lightweight frameworks. This release of OpenJPA is 100%
+ compliant with the JPA specification.
+
+ Additional information on the OpenJPA project may be found at the project
+ web site: http://openjpa.apache.org
+
+License
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with this
+ work for additional information regarding copyright ownership. The ASF
+ licenses this file to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance with the
+ License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ License for the specific language governing permissions and limitations
+ under the License.
+
+ The license may also be found in LICENSE.txt which is included in each
+ release of OpenJPA.
+
+Prerequisites
+
+ OpenJPA requires Java 1.5 but will not compile with Java 6. For more
+ detail please see http://issues.apache.org/jira/browse/OPENJPA-5
+
+Documentation
+
+ If you have questions about OpenJPA, a good source of information is the
+ online product manual. You can find the manual for the current release as
+ well as older releases of OpenJPA at
+ http://openjpa.apache.org/documentation.html
+
+ If you can't find what you're looking for in the manual or would like more
+ clarification you please post to the OpenJPA development mailing list.
+ Information on all of the OpenJPA mailing lists may be found here:
+ http://openjpa.apache.org/mailing-lists.html
+
+Getting Involved
+
+ The Apache OpenJPA project is being built by the open source community for
+ the open source community - we welcome your input and contributions!
+
+ What we are looking for
+ * Source code and fixes contributions
+ * Documentation assistance
+ * Product and feature suggestions
+ * Detailed and constructive feedback
+ * Articles and whitepapers
+
+ How do I Contribute?
+ * To discuss Apache OpenJPA topics check out the mailing lists.
+ * Informal discussion also occurs on the #openjpa IRC channel on
+ freenode.net.
+ * Bugs and other issues can be posted on the project JIRA.
+
+ OpenJPA 0.9.7 Release Notes
+
+Bugs
+
+ The following bugs have been fixed for release 0.9.7
+ * [OPENJPA-16] - NPE in createQuery for EJB QL with nested correlated
+ subqueries
+ * [OPENJPA-21] - Time is missing from list of mutable classes.
+ * [OPENJPA-22] - locate & substring queries fail both db2 & derby,
+ cannot use parameter markers in expression ?-?
+ * [OPENJPA-23] - -418 sqlexception using DB2 and EJB QL with SQRT or MOD
+ * [OPENJPA-24] - Allow OpenJPA to be extensible
+ * [OPENJPA-25] - Incorrect SQL generated for queries involving more than
+ one AbstractSchemaNames, generated SQL FROM clause is missing 'Table
+ alias'
+ * [OPENJPA-35] - In-memory Delete operation fails with active DataCache
+ * [OPENJPA-41] - transforming classes doesn't work
+ * [OPENJPA-48] - parsing error - cast of subselect does not work
+ * [OPENJPA-50] - bad sql pushdown, cast changes datatype
+ * [OPENJPA-53] - bad sql pushdown for nested subselects, missing nested
+ subselect
+ * [OPENJPA-54] - bad sql pushdown, should use all syntax
+ * [OPENJPA-56] - in derby concat with input parameter needs a cast,
+ otherwise becomes long varchar and some operations do not work
+ * [OPENJPA-60] - Specifying the wrong persistence implementation in
+ persistence.xml leads to misleading error message
+ * [OPENJPA-62] - Ejbql join queries show invalid null Entities when run
+ in a new persistence context where no entity instances exist.
+ * [OPENJPA-71] - Caching primitive array types consumes excessive memory
+ * [OPENJPA-77] - Problems in default setting in DB2Dictionary , also
+ missing support for DB2 z/OS platforms
+ * [OPENJPA-80] - Bad Escaping for LIKE in MySQL
+ * [OPENJPA-98] - Java deadlock when insert in t1 and find in t2 when
+ using IBM JVM 1.5.0
+ * [OPENJPA-100] - entries failing to be processed for persistence unit
+ rooted in an EAR
+ * [OPENJPA-102] - JTA transaction rollback, nonexistant instances,
+ transactional persistence context => failures during afterCompletion()
+ and close()
+ * [OPENJPA-103] - Default Listeners not being processed correctly
+ * [OPENJPA-104] - OpenJPA does not detach instances on rollback()
+ * [OPENJPA-107] - @SqlResultSetMappings fails in mapping tool with
+ java.lang.ArrayStoreException
+ * [OPENJPA-108] - @AttributeOverrides fails in mapping tool with
+ java.lang.ArrayStoreException
+ * [OPENJPA-109] - every NativeQuery using SqlResultSetMapping fails at
+ runtime with There is no query result mapping for "null" with name
+ "xxx" when the entity is persisted in a different method than the
+ method doing the query.
+ * [OPENJPA-110] - Every NamedNativeQuery using ResultSetMapping fails at
+ runtime with class cast exception when try to iterate over list
+ * [OPENJPA-111] - native queries fail when use named parameters
+ * [OPENJPA-115] - Bottleneck(s) with using OpenJPA in a
+ Container-managed environment
+ * [OPENJPA-116] - EntityManager.getDelegate should throw an
+ IllegalStateException
+ * [OPENJPA-118] - AutoDetach property has no effect
+ * [OPENJPA-119] - EntityManager.clear() should not implicitly invoke the
+ flush operation
+ * [OPENJPA-121] - Table name defaults to the class name instead of the
+ entity name
+ * [OPENJPA-122] - EntityManager does not throw exceptions after close()
+ in required cases
+ * [OPENJPA-132] - java.lang.NoSuchMethodError for entity with ID of type
+ java.sql.Date
+ * [OPENJPA-133] - Can't find non-public callback methods with superclass
+ or interface parameters
+ * [OPENJPA-134] - Extra unneeded SQL joins for OneToMany relationship
+ with fetch type EAGER
+ * [OPENJPA-139] - PersistenceException merging an entity with a Calendar
+ field.
+ * [OPENJPA-140] - Wrong package name in test classes
+ * [OPENJPA-142] - Entity name is ignored when specified in the orm.xml
+ file
+ * [OPENJPA-144] - JDBCConfigurationImpl does not support JNDI lookup for
+ non-jta-data-source.
+ * [OPENJPA-146] - Entity enhancement fails while using EmbeddedId on a
+ MappedSuperclass
+ * [OPENJPA-150] - @Column in @AttributeOverride not honoring table
+ attribute that maps to a secondary table in mappedsuperclass entity
+ * [OPENJPA-154] - OptimisticLockException working with Savepoints
+ * [OPENJPA-155] - java.lang.ArrayIndexOutOfBoundsException during commit
+ * [OPENJPA-157] - NullPointerException when running query with null
+ parameter
+ * [OPENJPA-162] - @OrderBy on @OneToMany does not allow ordering by @Id
+ value
+ * [OPENJPA-174] - error when find()'ing an abstract class
+ * [OPENJPA-175] - Eager selects by PagingResultObjectProvider may not
+ use the FetchBatchSize
+ * [OPENJPA-179] - Schemas defined in orm.xml are only applied when a
+ name is also specified.
+ * [OPENJPA-181] - ClassCastException when executing bulk delete on an
+ entity that owns a OneToOne with a Cascade.DELETE when DataCache is on
+ * [OPENJPA-185] - optional attribute is not overriden by xml descriptor
+ * [OPENJPA-186] - Build failure of OpenJPA sources from trunk
+ * [OPENJPA-202] - after invoking LRS processing in a client by calling an
+ @LRS annotated relationship, the next em.clear()/em.close() gets
+ org.apache.openjpa.persistence.InvalidStateException: You cannot
+ transfer large result set fields from one object or field to another
+ * [OPENJPA-208] - NoResultException and NonUniqueResultException are not
+ thrown when expected
+ * [OPENJPA-214] - Need to support floating point primary keys
+
+Improvements
+
+ Improvements made for release 0.9.7
+ * [OPENJPA-10] - persistence unit name should be default diagnostic
+ context for standard OpenJPA log impl
+ * [OPENJPA-37] - Support ant typedefs for OpenJPA tasks
+ * [OPENJPA-55] - Allow executeUpdate() invocations on native queries
+ * [OPENJPA-57] - persistence_1_0.xsd is missing
+ * [OPENJPA-63] - Better pessimistic lock support for DB2 v8.2+
+ * [OPENJPA-151] - Added field in enhanced vesrion of a class is not
+ serialized. Hence the change in detached+serialized instances is not
+ registered under certain conditions.
+ * [OPENJPA-153] - WebSphere and non-jta-data-source and default
+ ManagedRuntime
+ * [OPENJPA-158] - OpenJPA logs overly-verbose at INFO level
+ * [OPENJPA-161] - Overuse of synchronization in AbstractBrokerFactory
+ * [OPENJPA-166] - Track the reason why a setRollbackOnly invocation
+ was made
+ * [OPENJPA-176] - Exception prefixes should be human-readable
+ * [OPENJPA-196] - Ease the restrictions on forcing a matche between
+ the number of declared and assigned positional parameters
+
+New Features
+
+ Features added for release 0.9.7
+ * [OPENJPA-92] - Support for H2 Database Engine
+ * [OPENJPA-93] - Sequence generation in a JTA environment should not
+ require non-JTA datasource
+ * [OPENJPA-94] - Allow MappingTool and persistence.xml to support
+ drop-create for database schema
+ * [OPENJPA-182] - db2 update lock syntax WITH USE AND KEEP UPDATE
+ LOCKS
+
+Task
+
+ Tasks done for release 0.9.7
+ * [OPENJPA-36] - Add cwiki url to incubator status page
+
+Test
+
+ Additional testing done for release 0.9.7
+ * [OPENJPA-40] - Testing OpenJPA and Spring integration fails
+
+ OpenJPA 1.0.0 Release Notes
+
+Bugs fixed
+
+ * [OPENJPA-61] - Missing usage of TransactionSynchronizationRegistry
+ * [OPENJPA-86] - "uuid-hex" generator does not make affect in orm.xml
+ * [OPENJPA-143] - Problems with Single Table Inheritance Strategy (and
+ Discriminator Type of Integer)
+ * [OPENJPA-165] - QueryImpl.setFirstResult does not take already set
+ maxResults into account
+ * [OPENJPA-177] - When using NOT NULL constraint on foreign key it is
+ not possible to use CascadeType.ALL and GeneratedId
+ * [OPENJPA-199] - bulk update gets parsing exception trying to update
+ an attribute of an embedded class
+ * [OPENJPA-244] - Java 2 Security enablement
+ * [OPENJPA-248] - ForeignKey cascade delete action not working
+ * [OPENJPA-257] - Getter/Setter type inconsistency in Entity IdClass
+ * [OPENJPA-269] - Informix doesn't support subselects or using table
+ aliases in a delete statement.
+ * [OPENJPA-271] - DB2 missing JDBC driver 2 support
+ * [OPENJPA-272] - @GenerateValue (AUTO) doesn't work with Property
+ level access
+ * [OPENJPA-274] - JPQL queries cannot access version fields, including
+ bulk updates
+ * [OPENJPA-278] - OpenJPAQuery.getDataStoreActions() returns an empty
+ String array
+ * [OPENJPA-280] - Enhancement failure for inherited fields introduced
+ with change 532137
+ * [OPENJPA-281] - EAGER not the default fetch type without the @Basic
+ annotation
+ * [OPENJPA-284] - TableJDBCSeq for GeneratedValue.TABLE did not handle
+ initialValue correctly
+ * [OPENJPA-285] - Multiple deploy/undeploy leaks memory in PCRegistry
+ * [OPENJPA-287] - Generated methods on superclasses are not visible to
+ subclasses
+ * [OPENJPA-294] - Exception while enchnancing the java classes using
+ OpenJPA PCEnhancerTask with build.xml
+ * [OPENJPA-296] - UUID algorithm generating non-unique values
+ sometimes
+ * [OPENJPA-304] - Problems with DepthFirstAnalysis and the IBM JDK
+ * [OPENJPA-308] - Postgres: bytea vs. oid handling in
+ PreparedStatement.setNull() calls
+ * [OPENJPA-311] - Problem loading classes with OSGi classloaders
+ * [OPENJPA-312] - derby fails with duplicate primary key(s) in group
+ by list
+ * [OPENJPA-313] - list of objects returned by query partially correct
+ * [OPENJPA-314] - Unenhanced complex id in MappedSuperclass causes NPE
+ * [OPENJPA-315] - Unenhanced generated id field of a primitive wrapper
+ type causes NPE
+ * [OPENJPA-320] - Do not use System Tables (SYS*) with DB2
+ * [OPENJPA-321] - DB2 ABS Casting problem
+ * [OPENJPA-322] - Timezone on the Calendar object lost in proxying
+ * [OPENJPA-323] - Cleanup some message text
+ * [OPENJPA-256] - java.lang.ClassNotFoundException:
+ org.apache.openjpa.util.CacheMap in a jetty spring environment
+
+Sub-task
+
+ * [OPENJPA-279] - Fixed missing lookup for non-jta-data-source in
+ JDBCConfigurationImpl.
+ * [OPENJPA-297] - Lazy loading must be ignored in certain unenhanced
+ cases
+ * [OPENJPA-298] - Miscellaneous documentation improvements
+ * [OPENJPA-299] - Provide a means to enable the old enhancing agent
+
+Improvements
+
+ * [OPENJPA-259] - Ability to parse EJB QL multiline queries in orm.xml
+ * [OPENJPA-266] - Add Extensibility: Change "private" field/method to
+ "protected" or "public" in OpenJPA classes to be extendable
+ * [OPENJPA-275] - Bulk updates: version information should be
+ automatically maintained when the query does not
+
+New Feature
+
+ * [OPENJPA-168] - sql optimize n rows query hint
+ * [OPENJPA-239] - Option for the reverse mapping tool to generate
+ mapping annotations
+ * [OPENJPA-262] - Event notification of BrokerFactory creation
+ * [OPENJPA-263] - Introducing getAll(List) method for data cache to be
+ called by loadAll() will allow data cache plug-ins to leverage the
+ advantage of any third-party cache that provides a way to get
+ multiple object in one call by providing a list of keys (oids).
+ * [OPENJPA-317] - API formalization pre-1.0