openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r1190716 [8/10] - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/...
Date Sat, 29 Oct 2011 00:44:18 GMT
Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/AbstractUnenhancedClassTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/AbstractUnenhancedClassTest.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/AbstractUnenhancedClassTest.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/AbstractUnenhancedClassTest.java Sat Oct 29 00:44:11 2011
@@ -51,11 +51,12 @@ public abstract class AbstractUnenhanced
     //   * Java 6
     //   * Java 5 with javaagent
     //   * Java 5 without javaagent
-
+    OpenJPAConfiguration _conf;
     public void setUp() {
         setUp(getUnenhancedClass(), getUnenhancedSubclass(), CLEAR_TABLES);
         // trigger class redefinition
         emf.createEntityManager().close();
+        _conf = emf.getConfiguration();
         _log = emf.getConfiguration().getLog(OpenJPAConfiguration.LOG_ENHANCE);
     }
 
@@ -76,7 +77,7 @@ public abstract class AbstractUnenhanced
     public void testMetaData() {
         ClassMetaData meta = JPAFacadeHelper.getMetaData(emf,
             getUnenhancedClass());
-        assertEquals(ClassRedefiner.canRedefineClasses(_log), meta
+        assertEquals(ClassRedefiner.canRedefineClasses(_conf), meta
             .isIntercepting());
     }
 
@@ -264,7 +265,7 @@ public abstract class AbstractUnenhanced
 
     public void testEnhancer() throws IOException {
         List<Class<?>> subs =  ManagedClassSubclasser.prepareUnenhancedClasses(
-            emf.getConfiguration(), Collections.singleton(getUnenhancedClass()), null);
+            emf.getConfiguration(), Collections.singleton(getUnenhancedClass()));
         Class sub = subs.get(0);
         assertNotNull(sub);
         assertEquals("org.apache.openjpa.enhance."
@@ -311,7 +312,7 @@ public abstract class AbstractUnenhanced
 
         // we only expect lazy loading to work when we can redefine classes
         // or when accessing a property-access record that OpenJPA created.
-        if (ClassRedefiner.canRedefineClasses(_log)
+        if (ClassRedefiner.canRedefineClasses(_conf)
             || (!userDefined 
             	&& AccessCode.isProperty(sm.getMetaData().getAccessType()))) {
 
@@ -363,7 +364,7 @@ public abstract class AbstractUnenhanced
 
         // we only expect lazy loading to work when we can redefine classes
         // or when accessing a property-access record that OpenJPA created.
-        if (ClassRedefiner.canRedefineClasses(_log)
+        if (ClassRedefiner.canRedefineClasses(_conf)
             || AccessCode.isProperty(sm.getMetaData().getAccessType())) {
             assertFalse(sm.getLoaded()
                 .get(sm.getMetaData().getField("lazyField").getIndex()));
@@ -588,14 +589,13 @@ public abstract class AbstractUnenhanced
         ClassMetaData meta = JPAFacadeHelper.getMetaData(emf,
             getUnenhancedClass());
         List<Class<?>> subs =  ManagedClassSubclasser.prepareUnenhancedClasses(
-            emf.getConfiguration(), Collections.singleton(getUnenhancedClass()),
-            null);
+            emf.getConfiguration(), Collections.singleton(getUnenhancedClass()));
         assertSame(meta, JPAFacadeHelper.getMetaData(emf, subs.get(0)));
 
         meta = JPAFacadeHelper.getMetaData(emf, getUnenhancedSubclass());
         subs =  ManagedClassSubclasser.prepareUnenhancedClasses(
             emf.getConfiguration(),
-            Collections.singleton(getUnenhancedSubclass()), null);
+            Collections.singleton(getUnenhancedSubclass()));
         assertSame(meta, JPAFacadeHelper.getMetaData(emf, subs.get(0)));
     }
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/RestrictedMetaDataRepository.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/RestrictedMetaDataRepository.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/RestrictedMetaDataRepository.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/RestrictedMetaDataRepository.java Sat Oct 29 00:44:11 2011
@@ -48,8 +48,8 @@ public class RestrictedMetaDataRepositor
         }
     }
     
-    public Set<String> getPersistentTypeNames(boolean devpath, ClassLoader envLoader) {
-        Set<String> types = super.getPersistentTypeNames(devpath, envLoader);
+    public Set<String> getPersistentTypeNames(boolean devpath) {
+        Set<String> types = super.getPersistentTypeNames(devpath);
         String[] typeArray = types.toArray(new String[types.size()]);
         for (String type : typeArray) {
             if(_excludedTypes.contains(type)) {

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementWithMultiplePUs.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementWithMultiplePUs.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementWithMultiplePUs.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementWithMultiplePUs.java Sat Oct 29 00:44:11 2011
@@ -26,6 +26,7 @@ import java.util.List;
 
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.conf.OpenJPAConfigurationImpl;
+import org.apache.openjpa.enhance.PCEnhancer.Flags;
 import org.apache.openjpa.lib.conf.Configurations;
 import org.apache.openjpa.lib.util.BytecodeWriter;
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
@@ -46,13 +47,13 @@ public class TestEnhancementWithMultiple
         ClassLoader loader = AccessController
             .doPrivileged(J2DoPrivHelper.newTemporaryClassLoaderAction(
                 getClass().getClassLoader()));
+        conf.addClassLoader(loader);
         Project project = new Project();
 
-        String className =
-            "org.apache.openjpa.enhance.UnenhancedBootstrapInstance";
+        String className = "org.apache.openjpa.enhance.UnenhancedBootstrapInstance";
         BCClass bc = assertNotPC(loader, project, className);
 
-        PCEnhancer enhancer = new PCEnhancer(conf, bc, repos, loader);
+        PCEnhancer enhancer = new PCEnhancer(conf, bc, repos);
 
         assertEquals(PCEnhancer.ENHANCE_PC, enhancer.run());
         assertTrue(Arrays.asList(bc.getInterfaceNames()).contains(
@@ -79,11 +80,11 @@ public class TestEnhancementWithMultiple
         ClassLoader loader = AccessController
             .doPrivileged(J2DoPrivHelper.newTemporaryClassLoaderAction(
                 getClass().getClassLoader()));
+        conf.addClassLoader(loader);
         Project project = new Project();
 
         // make sure that the class is not already enhanced for some reason
-        String className =
-            "org.apache.openjpa.enhance.UnenhancedBootstrapInstance";
+        String className = "org.apache.openjpa.enhance.UnenhancedBootstrapInstance";
         BCClass bc = assertNotPC(loader, project, className);
 
         // build up a writer that just stores to a list so that we don't
@@ -98,8 +99,7 @@ public class TestEnhancementWithMultiple
             }
         };
 
-        PCEnhancer.run(conf, null, new PCEnhancer.Flags(), repos, writer,
-            loader);
+        PCEnhancer.run(conf, null, new PCEnhancer.Flags(), repos, writer);
 
         // ensure that we don't attempt to process classes listed in other PUs
         assertEquals(1, written.size());
@@ -108,7 +108,13 @@ public class TestEnhancementWithMultiple
         assertTrue(written.contains(className));
     }
 
-    public void testEnhancementOfAllPUsWithinAResource()
+    
+    
+    /**
+     * This test is retired due to <A href="https://issues.apache.org/jira/browse/OPENJPA-2057">
+     * classloading changes</A>.
+     */
+    public void xtestEnhancementOfAllPUsWithinAResource()
         throws IOException {
         OpenJPAConfiguration conf = new OpenJPAConfigurationImpl();
         Options opts = new Options();
@@ -118,6 +124,7 @@ public class TestEnhancementWithMultiple
         ClassLoader loader = AccessController
             .doPrivileged(J2DoPrivHelper.newTemporaryClassLoaderAction(
                 getClass().getClassLoader()));
+        conf.addClassLoader(loader);
         Project project = new Project();
 
         // make sure that the classes is not already enhanced for some reason
@@ -147,8 +154,14 @@ public class TestEnhancementWithMultiple
         opts.setProperty("MetaDataRepository", 
             "org.apache.openjpa.enhance.RestrictedMetaDataRepository(excludedTypes=" +
             "org.apache.openjpa.persistence.jdbc.annotations.UnenhancedMixedAccess)");
+        RestrictedMetaDataRepository rmdr = new RestrictedMetaDataRepository();
+        rmdr.setConfiguration(conf);
+        rmdr.setMetaDataFactory(repos.getMetaDataFactory());
+        
+        rmdr.setExcludedTypes("org.apache.openjpa.persistence.jdbc.annotations.UnenhancedMixedAccess");
         opts.put(PCEnhancer.class.getName() + "#bytecodeWriter", writer);
-        PCEnhancer.run(null, opts);
+        PCEnhancer.run(conf, null, new Flags(), rmdr, writer);
+//        PCEnhancer.run(null, opts);
 
         // ensure that we do process the classes listed in the PUs
         assertTrue(written.contains(

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/kernel/TestJDBCStoreOptSelect.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/kernel/TestJDBCStoreOptSelect.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/kernel/TestJDBCStoreOptSelect.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/kernel/TestJDBCStoreOptSelect.java Sat Oct 29 00:44:11 2011
@@ -73,7 +73,7 @@ public class TestJDBCStoreOptSelect exte
             // Check to see how many fks(intermediate fields) we selected.
             StateManagerImpl smi = ((StateManagerImpl) ((PersistenceCapable) ee1).pcGetStateManager());
             ClassMetaData cmd =
-                em.getConfiguration().getMetaDataRepositoryInstance().getMetaData(OptSelectEntity.class, null, true);
+                em.getConfiguration().getMetaDataRepositoryInstance().getMetaData(OptSelectEntity.class, true);
             int fks = 0;
             for (FieldMetaData fmd : cmd.getFields()) {
                 if (smi.getIntermediate(fmd.getIndex()) != null) {
@@ -97,7 +97,7 @@ public class TestJDBCStoreOptSelect exte
         FetchPlan fp = em.pushFetchPlan();
         fp.removeFetchGroups(fp.getFetchGroups());
         for (Class<?> cls : new Class<?>[] { OptSelectEntity.class }) {
-            ClassMetaData cmd = mdr.getMetaData(cls, null, true);
+            ClassMetaData cmd = mdr.getMetaData(cls, true);
             for (FieldMetaData fmd : cmd.getFields()) {
                 fp.addField(cls, fmd.getName());
             }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolTemporal.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolTemporal.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolTemporal.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolTemporal.java Sat Oct 29 00:44:11 2011
@@ -36,8 +36,7 @@ public class TestMappingToolTemporal ext
         ClassMapping mapping = (ClassMapping)
             ((OpenJPAEntityManagerFactorySPI) OpenJPAPersistence.cast(emf))
                 .getConfiguration().getMetaDataRepositoryInstance()
-                .getMetaData("TemporalFieldTypes", getClass().getClassLoader(),
-                        true);
+                .getMetaData("TemporalFieldTypes", true);
 
         assertEquals(java.sql.Types.TIMESTAMP, mapping.getFieldMapping(
                "dateDefaultField").getValueMapping().getColumns()[0].getType());

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestDynamicClassRegistration.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestDynamicClassRegistration.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestDynamicClassRegistration.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestDynamicClassRegistration.java Sat Oct 29 00:44:11 2011
@@ -73,8 +73,8 @@ public class TestDynamicClassRegistratio
         // trigger class initialization
         ManagedClassSubclasser.prepareUnenhancedClasses(
             emf1.getConfiguration(),
-            Collections.singleton(UnenhancedFieldAccess.class),
-            null);
+            Collections.singleton(UnenhancedFieldAccess.class)
+            );
 
         ClassMetaData meta =
             JPAFacadeHelper.getMetaData(emf1, UnenhancedFieldAccess.class);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/lib/conf/TestAnchorParsing.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/lib/conf/TestAnchorParsing.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/lib/conf/TestAnchorParsing.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/lib/conf/TestAnchorParsing.java Sat Oct 29 00:44:11 2011
@@ -70,16 +70,12 @@ public class TestAnchorParsing extends T
     public void testProductDerivationsLoadResource() {
         ProductDerivations.load(
             "org/apache/openjpa/lib/conf/product-derivations-load.xml",
-            "foo", null);
+            "foo");
 
-        ProductDerivations.load(
-            "org/apache/openjpa/lib/conf/product-derivations-load.xml",
-            null, null);
+        ProductDerivations.load("org/apache/openjpa/lib/conf/product-derivations-load.xml", null);
 
         try {
-            ProductDerivations.load(
-                "org/apache/openjpa/lib/conf/product-derivations-load.xml",
-                "nonexistant", null);
+            ProductDerivations.load("org/apache/openjpa/lib/conf/product-derivations-load.xml", "nonexistant");
             fail("pu 'nonexistant' does not exist");
         } catch (MissingResourceException mre) {
             // expected
@@ -88,7 +84,7 @@ public class TestAnchorParsing extends T
         try {
             ProductDerivations.load(
                 "org/apache/openjpa/lib/conf/product-derivations-load.xml",
-                "", null);
+                "");
             fail("pu '' does not exist");
         } catch (MissingResourceException mre) {
             // expected
@@ -97,7 +93,7 @@ public class TestAnchorParsing extends T
 
     public void testNonexistantResourceLoad() {
         try {
-            ProductDerivations.load("nonexistant-resource", null, null);
+            ProductDerivations.load("nonexistant-resource", null);
             fail("resource 'nonexistant-resource' should not exist");
         } catch (MissingResourceException e) {
             // expected
@@ -108,19 +104,19 @@ public class TestAnchorParsing extends T
         File validFile = resourceToTemporaryFile(
             "org/apache/openjpa/lib/conf/product-derivations-load.xml");
 
-        ProductDerivations.load(validFile, "foo", null);
+        ProductDerivations.load(validFile, "foo");
 
-        ProductDerivations.load(validFile, null, null);
+        ProductDerivations.load(validFile, null);
 
         try {
-            ProductDerivations.load(validFile, "nonexistant", null);
+            ProductDerivations.load(validFile, "nonexistant");
             fail("pu 'nonexistant' does not exist");
         } catch (MissingResourceException mre) {
             // expected
         }
 
         try {
-            ProductDerivations.load(validFile, "", null);
+            ProductDerivations.load(validFile, "");
             fail("pu '' does not exist");
         } catch (MissingResourceException mre) {
             // expected
@@ -132,7 +128,7 @@ public class TestAnchorParsing extends T
         File f = new File("this-should-not-exist");
         assertFalse(f.exists());
         try {
-            ProductDerivations.load(f, null, null);
+            ProductDerivations.load(f, null);
             fail(f.getName() + " does not exist");
         } catch (MissingResourceException e) {
             // expected

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java Sat Oct 29 00:44:11 2011
@@ -944,7 +944,7 @@ public class TestExplicitAccess extends 
             em.getConfiguration().getMetaDataRepositoryInstance();
         
         ClassMetaData cmd = mdr.getMetaData(PropAccessFieldStratsEntity.class, 
-            null, true);
+            true);
         // Assert expected persistent fields and properties were created
         assertNotNull(cmd.getField("embedId"));
         assertNotNull(cmd.getField("m2one"));
@@ -1035,8 +1035,7 @@ public class TestExplicitAccess extends 
         MetaDataRepository mdr = 
             em.getConfiguration().getMetaDataRepositoryInstance();
         
-        ClassMetaData cmd = mdr.getMetaData(FieldAccessPropStratsEntity.class, 
-            null, true);
+        ClassMetaData cmd = mdr.getMetaData(FieldAccessPropStratsEntity.class, true);
         // Assert expected persistent fields and properties were created
         assertNotNull(cmd.getField("eid"));
         assertNotNull(cmd.getField("elementCollection"));

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/TestVersion.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/TestVersion.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/TestVersion.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/TestVersion.java Sat Oct 29 00:44:11 2011
@@ -229,8 +229,7 @@ public class TestVersion extends Annotat
            ClassMapping cls =
                    ((JDBCConfigurationImpl) ((OpenJPAEntityManagerSPI)
                    OpenJPAPersistence.cast(pm)).getConfiguration())
-                   .getMappingRepositoryInstance().getMapping(EmbedOwner.class,
-                           null, true);
+                   .getMappingRepositoryInstance().getMapping(EmbedOwner.class, true);
            assertEquals(NoneVersionStrategy.getInstance(),
                    cls.getVersion().getStrategy()); assertEquals(0,
                            cls.getVersion().getColumns().length);
@@ -243,8 +242,7 @@ public class TestVersion extends Annotat
                (OpenJPAEntityManager) currentEntityManager();
            ClassMapping cls = ((JDBCConfigurationImpl)((OpenJPAEntityManagerSPI)
                    OpenJPAPersistence.cast(pm)).getConfiguration())
-                   .getMappingRepositoryInstance().getMapping(AnnoTest1.class,
-                           null, true);
+                   .getMappingRepositoryInstance().getMapping(AnnoTest1.class, true);
 		   assertTrue(NoneVersionStrategy.getInstance() !=
 			   cls.getVersion().getStrategy()); assertEquals(1,
                        cls.getVersion().getColumns().length);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/xml/TestMetaDataComplete.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/xml/TestMetaDataComplete.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/xml/TestMetaDataComplete.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/xml/TestMetaDataComplete.java Sat Oct 29 00:44:11 2011
@@ -58,10 +58,10 @@ public class TestMetaDataComplete extend
 			MetaDataRepository repos = oemf.getConfiguration()
 					.getMetaDataRepositoryInstance();
 
-			entityA = repos.getMetaData(EntityA.class, null, true);
-			entityB = repos.getMetaData(EntityB.class, null, true);
-            derivedA = repos.getMetaData(DerivedA.class, null, true);
-            derivedB = repos.getMetaData(DerivedB.class, null, true);
+			entityA = repos.getMetaData(EntityA.class, true);
+			entityB = repos.getMetaData(EntityB.class, true);
+            derivedA = repos.getMetaData(DerivedA.class, true);
+            derivedB = repos.getMetaData(DerivedB.class, true);
 		}
 	}
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cache/jpa/AbstractCacheModeTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cache/jpa/AbstractCacheModeTestCase.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cache/jpa/AbstractCacheModeTestCase.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cache/jpa/AbstractCacheModeTestCase.java Sat Oct 29 00:44:11 2011
@@ -451,7 +451,7 @@ public abstract class AbstractCacheModeT
     private String getAlias(Class<?> cls) {
         ClassMapping mapping =
             (ClassMapping) getEntityManagerFactory().getConfiguration().getMetaDataRepositoryInstance().getMetaData(
-                cls, null, true);
+                cls, true);
         return mapping.getTypeAlias();
     }
 }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/compat/TestEmbeddableSuperclass.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/compat/TestEmbeddableSuperclass.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/compat/TestEmbeddableSuperclass.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/compat/TestEmbeddableSuperclass.java Sat Oct 29 00:44:11 2011
@@ -64,7 +64,7 @@ public class TestEmbeddableSuperclass
     public void testRelationMappings() {
         JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
         ClassMapping cls = conf.getMappingRepositoryInstance().
-            getMapping(EmbeddableSuperSub.class, null, true);
+            getMapping(EmbeddableSuperSub.class, true);
         FieldMapping fm = cls.getFieldMapping("sub");
         assertTrue(fm.getStrategy() instanceof RelationFieldStrategy);
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java Sat Oct 29 00:44:11 2011
@@ -384,17 +384,14 @@ public abstract class CacheTest extends 
         DataCache cache = cacheManager(factory).getSystemDataCache();
         assertEquals(defaultCache, cache);
 
-        ClassMetaData aMeta = repos.getMetaData(CacheObjectA.class, null, true);
-        ClassMetaData aChild1Meta = repos.getMetaData(CacheObjectAChild1.class,
-            null, true);
-        ClassMetaData aChild2Meta = repos.getMetaData(CacheObjectAChild2.class,
-            null, true);
-        ClassMetaData bMeta = repos.getMetaData(CacheObjectB.class, null, true);
-        ClassMetaData bChild1Meta = repos.getMetaData(CacheObjectBChild1.class,
-            null, true);
-        ClassMetaData cMeta = repos.getMetaData(CacheObjectC.class, null, true);
-        ClassMetaData dMeta = repos.getMetaData(CacheObjectD.class, null, true);
-        ClassMetaData eMeta = repos.getMetaData(CacheObjectE.class, null, true);
+        ClassMetaData aMeta = repos.getMetaData(CacheObjectA.class, true);
+        ClassMetaData aChild1Meta = repos.getMetaData(CacheObjectAChild1.class, true);
+        ClassMetaData aChild2Meta = repos.getMetaData(CacheObjectAChild2.class, true);
+        ClassMetaData bMeta = repos.getMetaData(CacheObjectB.class, true);
+        ClassMetaData bChild1Meta = repos.getMetaData(CacheObjectBChild1.class, true);
+        ClassMetaData cMeta = repos.getMetaData(CacheObjectC.class, true);
+        ClassMetaData dMeta = repos.getMetaData(CacheObjectD.class, true);
+        ClassMetaData eMeta = repos.getMetaData(CacheObjectE.class, true);
 
         cache = aMeta.getDataCache();
         assertEquals(defaultCache, cache);
@@ -460,7 +457,7 @@ public abstract class CacheTest extends 
         Object relationOid = em.getObjectId(a.getRelatedObject());
         relationOid = new Id(CacheObjectA.class, relationOid.toString());
 
-        ClassMetaData meta = repos.getMetaData(CacheObjectA.class, null, true);
+        ClassMetaData meta = repos.getMetaData(CacheObjectA.class, true);
         DataCache cache = meta.getDataCache();
 
         // drop the related data from the cache
@@ -912,7 +909,7 @@ public abstract class CacheTest extends 
                 ((((OpenJPAEntityManagerFactorySPI) factory2))
                 .getConfiguration()).getMetaDataRepositoryInstance();
             ClassMetaData meta = repos2
-                .getMetaData(CacheObjectA.class, em2.getClassLoader(), true);
+                .getMetaData(CacheObjectA.class, true);
             cache = meta.getDataCache();
             assertTrue(cache.contains(oidwithclass));
 
@@ -1622,8 +1619,7 @@ public abstract class CacheTest extends 
             ClassMetaData meta =
                 ((OpenJPAEntityManagerFactorySPI) OpenJPAPersistence
                     .cast(factory)).getConfiguration()
-                    .getMetaDataRepositoryInstance().getMetaData(a.getClass(),
-                    null, false);
+                    .getMetaDataRepositoryInstance().getMetaData(a.getClass(), false);
             FieldMetaData fmd = meta.getField("date");
             d = (Date) data.getData(fmd.getIndex());
             Broker broker = JPAFacadeHelper.toBroker(em1);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestPartitionedDataCache.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestPartitionedDataCache.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestPartitionedDataCache.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestPartitionedDataCache.java Sat Oct 29 00:44:11 2011
@@ -53,7 +53,16 @@ public class TestPartitionedDataCache ex
         } catch (UserException e) {
             System.err.println(e);
         }
-        badProperty = "(cacheSize=100),(name=b,cacheSize=200)";// missing name
+        
+    }
+    
+    /**
+     * This test will not run because of Configuration is not assigned
+     * if a cache is directly instantiated in a test.
+     */
+    public void xtestMisConfiguration() {
+        PartitionedDataCache cache = new PartitionedDataCache();
+        String badProperty = "(cacheSize=100),(name=b,cacheSize=200)";// missing name
         try {
             cache.setPartitions(badProperty);
             fail("Expected parse error on " + badProperty);
@@ -74,7 +83,6 @@ public class TestPartitionedDataCache ex
         } catch (UserException e) {
             System.err.println(e);
         }
-        
     }
     
     public void testPolicyConfiguration() {

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java Sat Oct 29 00:44:11 2011
@@ -48,7 +48,7 @@ public class TestStatistics extends Sing
 
 	void startCaching(Class<?> cls) {
 		ClassMetaData meta = emf.getConfiguration()
-                .getMetaDataRepositoryInstance().getMetaData(cls, null, true);
+                .getMetaDataRepositoryInstance().getMetaData(cls, true);
 		meta.setDataCacheName(DataCache.NAME_DEFAULT);
 	}
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java Sat Oct 29 00:44:11 2011
@@ -197,16 +197,14 @@ public class TestDynamicSchemas extends 
         DBDictionary dict = conf.getDBDictionaryInstance();
         ClassMapping mapping =  (ClassMapping)conf.
             getMetaDataRepositoryInstance().
-            getMetaData(EntityVeryLongNames.class,getClass().
-                getClassLoader(), true);
+            getMetaData(EntityVeryLongNames.class, true);
         Table table = mapping.getTable();
         assertTrue(table.getName().length() > 0);
         assertTrue(table.getName().length() <= dict.maxTableNameLength);
         validateColumnNames(table, dict);
         mapping =  (ClassMapping)conf.
             getMetaDataRepositoryInstance().
-            getMetaData(EntityReservedWords.class,getClass().
-                getClassLoader(), true);
+            getMetaData(EntityReservedWords.class, true);
         table = mapping.getTable();
         assertTrue(table.getName().length() > 0);
         assertTrue(table.getName().length() <= dict.maxTableNameLength);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java Sat Oct 29 00:44:11 2011
@@ -2828,8 +2828,7 @@ public class TestEmbeddable extends SQLL
             conf, 
             new String[] { "org.apache.openjpa.persistence.embed.Book" },
             flags,
-            conf.getClassResolverInstance().
-            getClassLoader(MappingTool.class, null));        
+            conf.getClassLoader());        
     }
 
     /*

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestNoNoArgs.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestNoNoArgs.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestNoNoArgs.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestNoNoArgs.java Sat Oct 29 00:44:11 2011
@@ -33,7 +33,6 @@ public class TestNoNoArgs
 
     OpenJPAConfiguration conf;
     MetaDataRepository repos;
-    ClassLoader loader;
     private PCEnhancer.Flags flags = new PCEnhancer.Flags();
 
     public TestNoNoArgs(String s) {
@@ -41,19 +40,14 @@ public class TestNoNoArgs
     }
 
     public void setUp() {
-        OpenJPAEntityManager em =
-            (OpenJPAEntityManager) currentEntityManager();
+        OpenJPAEntityManager em = (OpenJPAEntityManager) currentEntityManager();
         conf = ((OpenJPAEntityManagerSPI) em).getConfiguration();
         repos = conf.newMetaDataRepositoryInstance();
-        loader = em.getClassLoader();
         endEm(em);
     }
 
-    public void testNoNoArgs()
-        throws IOException {
-        PCEnhancer.run((OpenJPAConfiguration) conf,
-            new String[]{ },
-            flags, repos, null, loader);
+    public void testNoNoArgs() throws IOException {
+        PCEnhancer.run((OpenJPAConfiguration) conf, new String[]{ }, flags, repos, null);
     }
 
     public void testNo2NoArgs()
@@ -61,8 +55,7 @@ public class TestNoNoArgs
         flags.addDefaultConstructor = false;
         boolean caughtException = false;
         try {
-            PCEnhancer.run((OpenJPAConfiguration) conf, new String[]{ },
-                flags, repos, null, loader);
+            PCEnhancer.run((OpenJPAConfiguration) conf, new String[]{ },  flags, repos, null);
         } catch (OpenJPAException e) {
             caughtException = true;
         }
@@ -72,7 +65,6 @@ public class TestNoNoArgs
     public void testNo3NoArgs()
         throws IOException {
         PCEnhancer.run((OpenJPAConfiguration) conf,
-            new String[]{ "persistence.enhance.common.apps.Entity1" },
-            flags, repos, null, loader);
+            new String[]{ "persistence.enhance.common.apps.Entity1" }, flags, repos, null);
     }
 }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestSubclassedBehavior.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestSubclassedBehavior.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestSubclassedBehavior.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestSubclassedBehavior.java Sat Oct 29 00:44:11 2011
@@ -541,7 +541,7 @@ public class TestSubclassedBehavior exte
         // registry-parsing code.
         ClassMetaData meta = getConfiguration()
             .getMetaDataRepositoryInstance().
-            getMetaData(DerivedEntity.class, null, false);
+            getMetaData(DerivedEntity.class, false);
         assertTrue("meta's access should be ACCESS_PROPERTY",
         		AccessCode.isProperty(meta.getAccessType()));
         FieldMetaData[] fmds = meta.getFields();

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/event/TestLifecycleEventManager.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/event/TestLifecycleEventManager.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/event/TestLifecycleEventManager.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/event/TestLifecycleEventManager.java Sat Oct 29 00:44:11 2011
@@ -52,7 +52,7 @@ public class TestLifecycleEventManager
                 OpenJPAPersistence.createEntityManagerFactory("TestConv2", "")))
                 .
                     getConfiguration().getMetaDataRepositoryInstance();
-        ClassMetaData meta = repos.getMetaData(RuntimeTest2.class, null, true);
+        ClassMetaData meta = repos.getMetaData(RuntimeTest2.class, true);
         LifecycleEventManager mgr = new LifecycleEventManager();
         RuntimeTest2 pc = new RuntimeTest2();
         Listener listener = new Listener();
@@ -126,7 +126,7 @@ public class TestLifecycleEventManager
                 OpenJPAPersistence.createEntityManagerFactory("TestConv2", "")))
                 .
                     getConfiguration().getMetaDataRepositoryInstance();
-        ClassMetaData meta = repos.getMetaData(RuntimeTest2.class, null, true);
+        ClassMetaData meta = repos.getMetaData(RuntimeTest2.class, true);
 
         LifecycleEventManager mgr = new LifecycleEventManager();
         RuntimeTest2 pc = new RuntimeTest2();

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestTableGeneratorMultithreaded.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestTableGeneratorMultithreaded.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestTableGeneratorMultithreaded.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestTableGeneratorMultithreaded.java Sat Oct 29 00:44:11 2011
@@ -43,8 +43,8 @@ public class TestTableGeneratorMultithre
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
         MetaDataRepository repo = emf.getConfiguration().getMetaDataRepositoryInstance();
         // Initialize MetaData
-        repo.getMetaData(Dog.class, loader, true);
-        repo.getSequenceMetaData("Dog_Gen", loader, true);
+        repo.getMetaData(Dog.class, true);
+        repo.getSequenceMetaData("Dog_Gen", true);
 
     }
 
@@ -82,15 +82,14 @@ public class TestTableGeneratorMultithre
         }
 
         public void run() {
-            ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
-            SequenceMetaData meta = _repo.getSequenceMetaData("Dog_Gen", contextLoader, true);
+            SequenceMetaData meta = _repo.getSequenceMetaData("Dog_Gen", true);
             meta.setInitialValue(1);
             meta.setIncrement(10000);
             _em = (EntityManagerImpl) emf.createEntityManager();
             _ctx = (StoreContext) _em.getBroker();
-            _cmd = _repo.getMetaData(Dog.class, contextLoader, true);
+            _cmd = _repo.getMetaData(Dog.class, true);
 
-            _seq = (TableJDBCSeq) meta.getInstance(contextLoader);
+            _seq = (TableJDBCSeq) meta.getInstance();
             // Change defaults so this test doesn't take so long to run.
             _seq.setAllocate(ALLOC_SIZE);
             _seq.setInitialValue(1);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/graph/TestPersistentGraph.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/graph/TestPersistentGraph.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/graph/TestPersistentGraph.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/graph/TestPersistentGraph.java Sat Oct 29 00:44:11 2011
@@ -111,7 +111,7 @@ public class TestPersistentGraph extends
     FieldMapping getFieldMapping(Class<?> pcClass, String field) {
         MappingRepository repos = (MappingRepository) emf.getConfiguration()
                 .getMetaDataRepositoryInstance();
-        ClassMapping cmd = repos.getMapping(pcClass, null, true);
+        ClassMapping cmd = repos.getMapping(pcClass, true);
         assertNotNull("No metadata found for " + pcClass, cmd);
         FieldMapping fmd = cmd.getFieldMapping(field);
         assertNotNull("No metadata found for " + pcClass.getName() + "." + field + " Fields are "
@@ -150,8 +150,8 @@ public class TestPersistentGraph extends
 
     FieldStrategy getStrategy(Class<?> cls, String field) {
         MetaDataRepository repos = emf.getConfiguration().getMetaDataRepositoryInstance();
-        ClassMetaData cmd = repos.getMetaData(cls, null, true);
-        assertNotNull("No metadat found for " + cls, cmd);
+        ClassMetaData cmd = repos.getMetaData(cls, true);
+        assertNotNull("No metadata found for " + cls, cmd);
         FieldMetaData fmd = cmd.getField(field);
         assertNotNull("No metadata found for " + cls.getName() + "." + field + " Fields are "
                 + Arrays.toString(cmd.getFieldNames()), fmd);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java Sat Oct 29 00:44:11 2011
@@ -54,7 +54,7 @@ public class TestSharedUnqualifiedClassN
     public void testMappedSuperclass() {
         ClassMetaData meta = emf.getConfiguration()
             .getMetaDataRepositoryInstance()
-            .getMetaData("SharedName1", getClass().getClassLoader(), true);
+            .getMetaData("SharedName1", true);
         assertEquals(
             org.apache.openjpa.persistence.inheritance.entity.SharedName1.class,
             meta.getDescribedType());
@@ -63,7 +63,7 @@ public class TestSharedUnqualifiedClassN
     public void testEmbeddable() {
         ClassMetaData meta = emf.getConfiguration()
             .getMetaDataRepositoryInstance()
-            .getMetaData("SharedName2", getClass().getClassLoader(), true);
+            .getMetaData("SharedName2", true);
         assertEquals(
             org.apache.openjpa.persistence.inheritance.entity.SharedName2.class,
             meta.getDescribedType());

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestFKColumnNames.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestFKColumnNames.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestFKColumnNames.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestFKColumnNames.java Sat Oct 29 00:44:11 2011
@@ -52,10 +52,10 @@ public class TestFKColumnNames extends A
                 (MappingRepository) emf.getConfiguration()
                         .getMetaDataRepositoryInstance();
 
-        assertEquals("SELECT_ID", repos.getMapping(Inner1.class, null, true)
+        assertEquals("SELECT_ID", repos.getMapping(Inner1.class, true)
                 .getFieldMapping("select").getColumns()[0].getName());
 
-        assertEquals("FROM_ID", repos.getMapping(Inner2.class, null, true)
+        assertEquals("FROM_ID", repos.getMapping(Inner2.class, true)
                 .getFieldMapping("from").getColumns()[0].getName());
         closeEMF(emf);
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestDiscriminator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestDiscriminator.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestDiscriminator.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestDiscriminator.java Sat Oct 29 00:44:11 2011
@@ -62,8 +62,7 @@ public class TestDiscriminator
     public void testJoinedDiscriminatorWithColumn() {
         JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
         MappingRepository repo = conf.getMappingRepositoryInstance();
-        ClassMapping cls = repo.getMapping(AnnoTest1.class, 
-            null, true);
+        ClassMapping cls = repo.getMapping(AnnoTest1.class, true);
         assertTrue(cls.getDiscriminator().getStrategy()
             instanceof ValueMapDiscriminatorStrategy);
         assertEquals(1, cls.getDiscriminator().getColumns().length);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEJBEmbedded.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEJBEmbedded.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEJBEmbedded.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEJBEmbedded.java Sat Oct 29 00:44:11 2011
@@ -157,8 +157,7 @@ public class TestEJBEmbedded extends Sin
 
     public void testMappingTransferAndOverride() {
         JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
-        ClassMapping cls = conf.getMappingRepositoryInstance().getMapping
-            (EmbedOwner.class, null, true);
+        ClassMapping cls = conf.getMappingRepositoryInstance().getMapping(EmbedOwner.class, true);
         assertEquals("OWN_BASIC", cls.getFieldMapping("basic").
             getColumns()[0].getName());
         ClassMapping embed = cls.getFieldMapping("embed").getEmbeddedMapping();

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEmbeddableSuperclass.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEmbeddableSuperclass.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEmbeddableSuperclass.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEmbeddableSuperclass.java Sat Oct 29 00:44:11 2011
@@ -49,8 +49,7 @@ public class TestEmbeddableSuperclass
 
     public void testSuperclassEmbeddedOnly() {
         ClassMapping cls = ((JDBCConfiguration) emf.getConfiguration()).
-            getMappingRepositoryInstance().getMapping(EmbeddableSuper.class, 
-            null, true);
+            getMappingRepositoryInstance().getMapping(EmbeddableSuper.class, true);
         assertTrue(cls.isEmbeddedOnly());
         assertEquals(NoneClassStrategy.getInstance(), cls.getStrategy());
     }
@@ -58,7 +57,7 @@ public class TestEmbeddableSuperclass
     public void testSubclassMappingDefaultsAndOverrides() {
         JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
         ClassMapping cls = conf.getMappingRepositoryInstance().
-            getMapping(EmbeddableSuperSub.class, null, true);
+            getMapping(EmbeddableSuperSub.class, true);
         assertTrue(!cls.isEmbeddedOnly());
         assertTrue(cls.getStrategy() instanceof FullClassStrategy);
         assertEquals(ClassMapping.ID_APPLICATION, cls.getIdentityType());
@@ -87,7 +86,7 @@ public class TestEmbeddableSuperclass
     public void testSubclassDiscriminatorMapping() {
         JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
         ClassMapping cls = conf.getMappingRepositoryInstance().
-            getMapping(EmbeddableSuperSub.class, null, true);
+            getMapping(EmbeddableSuperSub.class, true);
         assertEquals("DISC", cls.getDiscriminator().getColumns()[0].
             getName());
     }
@@ -95,14 +94,14 @@ public class TestEmbeddableSuperclass
     public void testVersionOverrideMapping() {
         JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
         ClassMapping cls = conf.getMappingRepositoryInstance().
-            getMapping(EmbeddableSuperSub.class, null, true);
+            getMapping(EmbeddableSuperSub.class, true);
         assertEquals("VERSVAL", cls.getVersion().getColumns()[0].getName());
     }
 
     public void testRelationMappings() {
         JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
         ClassMapping cls = conf.getMappingRepositoryInstance().
-            getMapping(EmbeddableSuperSub.class, null, true);
+            getMapping(EmbeddableSuperSub.class, true);
         FieldMapping fm = cls.getFieldMapping("sub");
         assertTrue(fm.getStrategy() instanceof RelationFieldStrategy);
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEnumerated.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEnumerated.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEnumerated.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEnumerated.java Sat Oct 29 00:44:11 2011
@@ -41,7 +41,7 @@ public class TestEnumerated
     public void testMapping() {
         ClassMapping cls = (ClassMapping) emf.getConfiguration().
             getMetaDataRepositoryInstance().getMetaData(AnnoTest1.class, 
-            null, true);
+            true);
         FieldMapping fm = cls.getDeclaredFieldMapping("enumeration");
         assertNotNull(fm);
         assertEquals(FieldMapping.MANAGE_PERSISTENT, fm.getManagement());

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestExtensionAnnotations.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestExtensionAnnotations.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestExtensionAnnotations.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestExtensionAnnotations.java Sat Oct 29 00:44:11 2011
@@ -41,8 +41,7 @@ public class TestExtensionAnnotations
     public void setUp() {
         setUp(ExtensionsEntity.class);
         _mapping = ((JDBCConfiguration) emf.getConfiguration()).
-            getMappingRepositoryInstance().getMapping(ExtensionsEntity.class,
-            null, true);
+            getMappingRepositoryInstance().getMapping(ExtensionsEntity.class, true);
     }
 
     public void testDataStoreId() {

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestGenerators.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestGenerators.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestGenerators.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestGenerators.java Sat Oct 29 00:44:11 2011
@@ -42,7 +42,7 @@ public class TestGenerators extends Sing
 
     public void testGet() {
         if (!PersistenceCapable.class.isAssignableFrom(Generator.class)
-            && !ClassRedefiner.canRedefineClasses(_log))
+            && !ClassRedefiner.canRedefineClasses(emf.getConfiguration()))
             fail("This test requires a higher level of enhancement than"
                 + " is available in the current environment.");
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestMapKey.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestMapKey.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestMapKey.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestMapKey.java Sat Oct 29 00:44:11 2011
@@ -46,36 +46,33 @@ public class TestMapKey
 
     public void testDefaultMapKeyMapping() {
         ClassMapping mapping = ((JDBCConfiguration) emf.getConfiguration())
-            .getMappingRepositoryInstance().getMapping(AnnoTest1.class,
-                null, true);
+            .getMappingRepositoryInstance().getMapping(AnnoTest1.class, true);
         FieldMapping fm = mapping.getFieldMapping("defaultMapKey");
         assertTrue(fm.getStrategy() instanceof RelationMapTableFieldStrategy);
         assertEquals("pk", fm.getKey().getValueMappedBy());
-        assertEquals(mapping.getRepository().getMetaData(Flat1.class, null,
-            true).getField("pk"), fm.getKey().getValueMappedByMetaData());
+        assertEquals(mapping.getRepository().getMetaData(Flat1.class, true).getField("pk"), 
+        		fm.getKey().getValueMappedByMetaData());
     }
 
     public void testNamedMapKeyMapping() {
         ClassMapping mapping = ((JDBCConfiguration) emf.getConfiguration())
-            .getMappingRepositoryInstance().getMapping(AnnoTest1.class,
-                null, true);
+            .getMappingRepositoryInstance().getMapping(AnnoTest1.class, true);
         FieldMapping fm = mapping.getFieldMapping("namedMapKey");
         assertTrue(fm.getStrategy() instanceof RelationMapTableFieldStrategy);
         assertEquals("basic", fm.getKey().getValueMappedBy());
-        assertEquals(mapping.getRepository().getMetaData(Flat1.class, null,
-            true).getField("basic"), fm.getKey().getValueMappedByMetaData());
+        assertEquals(mapping.getRepository().getMetaData(Flat1.class, true)
+        		.getField("basic"), fm.getKey().getValueMappedByMetaData());
     }
 
     public void testInverseOwnerMapKeyMapping() {
         ClassMapping mapping = ((JDBCConfiguration) emf.getConfiguration())
-            .getMappingRepositoryInstance().getMapping(AnnoTest1.class,
-                null, true);
+            .getMappingRepositoryInstance().getMapping(AnnoTest1.class, true);
         FieldMapping fm = mapping.getFieldMapping("inverseOwnerMapKey");
         assertTrue(fm.getStrategy() instanceof
             RelationMapInverseKeyFieldStrategy);
         assertEquals("basic", fm.getKey().getValueMappedBy());
         assertEquals(mapping.getRepository().getMetaData(AnnoTest2.class,
-            null, true).getField("basic"), fm.getKey().
+            true).getField("basic"), fm.getKey().
             getValueMappedByMetaData());
     }
 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestTablePerClassInheritance.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestTablePerClassInheritance.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestTablePerClassInheritance.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestTablePerClassInheritance.java Sat Oct 29 00:44:11 2011
@@ -42,8 +42,7 @@ public class TestTablePerClassInheritanc
 
     public void testMapping() {
         ClassMapping mapping = ((JDBCConfiguration) emf.getConfiguration()).
-            getMappingRepositoryInstance().getMapping(TablePerClass2.class,
-            null, true);
+            getMappingRepositoryInstance().getMapping(TablePerClass2.class, true);
         assertTrue(mapping.getStrategy() instanceof FullClassStrategy);
         assertTrue(mapping.getDiscriminator().getStrategy()
             instanceof NoneDiscriminatorStrategy);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestVersion.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestVersion.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestVersion.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestVersion.java Sat Oct 29 00:44:11 2011
@@ -180,8 +180,7 @@ public class TestVersion extends SingleE
 
     public void testNoDefaultVersionWithoutFieldOrColumn() {
         ClassMapping cls = ((JDBCConfiguration) emf.getConfiguration()).
-            getMappingRepositoryInstance().getMapping(EmbedOwner.class, 
-            null, true);
+            getMappingRepositoryInstance().getMapping(EmbedOwner.class, true);
         assertEquals(NoneVersionStrategy.getInstance(),
             cls.getVersion().getStrategy());
         assertEquals(0, cls.getVersion().getColumns().length);
@@ -189,8 +188,7 @@ public class TestVersion extends SingleE
 
     public void testVersionWithField() {
         ClassMapping cls = ((JDBCConfiguration) emf.getConfiguration()).
-            getMappingRepositoryInstance().getMapping(AnnoTest1.class, 
-            null, true);
+            getMappingRepositoryInstance().getMapping(AnnoTest1.class, true);
         assertTrue(NoneVersionStrategy.getInstance() !=
             cls.getVersion().getStrategy());
         assertEquals(1, cls.getVersion().getColumns().length);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/JDBCTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/JDBCTestCase.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/JDBCTestCase.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/JDBCTestCase.java Sat Oct 29 00:44:11 2011
@@ -57,8 +57,7 @@ public abstract class JDBCTestCase exten
     public ClassMapping getClassMapping(Class c) {
         
         OpenJPAConfiguration jdoConf = getConfiguration();
-        return ((JDBCConfiguration) jdoConf).getMappingRepositoryInstance().
-            getMapping(c, getClass().getClassLoader(), true);
+        return ((JDBCConfiguration) jdoConf).getMappingRepositoryInstance().getMapping(c, true);
     }
 
     public FieldMapping getFieldMapping(Class c, String field) {
@@ -66,7 +65,6 @@ public abstract class JDBCTestCase exten
     }
 
     public boolean isInheritanceStrategyVertical() {
-        return VerticalClassStrategy.class.
-            isAssignableFrom(getDefaultInheritanceStrategy());
+        return VerticalClassStrategy.class.isAssignableFrom(getDefaultInheritanceStrategy());
     }
 }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestDataStoreTrips.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestDataStoreTrips.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestDataStoreTrips.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestDataStoreTrips.java Sat Oct 29 00:44:11 2011
@@ -77,10 +77,8 @@ public class TestDataStoreTrips extends 
             (JDBCConfiguration) ((OpenJPAEntityManagerSPI) kem)
             .getConfiguration();        
 
-        ClassMapping mapping = conf.getMappingRepositoryInstance().getMapping
-            (DataStoreTripsPC.class, null, true);
-        String table = conf.getDBDictionaryInstance()
-            .getFullName(mapping.getTable(), false);
+        ClassMapping mapping = conf.getMappingRepositoryInstance().getMapping(DataStoreTripsPC.class, true);
+        String table = conf.getDBDictionaryInstance().getFullName(mapping.getTable(), false);
 
         // get factory with counter listener
         _factory = getEmf();

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestEfficientAttach.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestEfficientAttach.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestEfficientAttach.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestEfficientAttach.java Sat Oct 29 00:44:11 2011
@@ -73,7 +73,7 @@ public class TestEfficientAttach extends
         MetaDataRepository repos = conf.getMappingRepositoryInstance();
         ClassMetaData meta;
         for (int i = 0; i < clss.length; i++) {
-            meta = repos.getMetaData(clss[i], null, true);
+            meta = repos.getMetaData(clss[i], true);
             detachedStateFields[i] = meta.getDetachedState();
             meta.setDetachedState(null);
 
@@ -85,7 +85,7 @@ public class TestEfficientAttach extends
         } finally {
             // set detached state back
             for (int i = 0; i < clss.length; i++)
-                repos.getMetaData(clss[i], null, true).setDetachedState
+                repos.getMetaData(clss[i], true).setDetachedState
                     (detachedStateFields[i]);
         }
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestIncrementalJDBCFlushes.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestIncrementalJDBCFlushes.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestIncrementalJDBCFlushes.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestIncrementalJDBCFlushes.java Sat Oct 29 00:44:11 2011
@@ -74,8 +74,7 @@ public class TestIncrementalJDBCFlushes
         JDBCStore store = (JDBCStore) getStoreManager(em, true);
         Connection conn = store.getConnection();
         ClassMapping mapping = store.getConfiguration().
-                getMappingRepositoryInstance().getMapping(RuntimeTest1.class,
-                null, true);
+                getMappingRepositoryInstance().getMapping(RuntimeTest1.class, true);
         FieldMapping fm = mapping.getFieldMapping("stringField");
         String tableName =
             store.getConfiguration().getDBDictionaryInstance().getFullName(

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/mapping/bidi/TestOneSidedParentChildWithImplicitForeignKey.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/mapping/bidi/TestOneSidedParentChildWithImplicitForeignKey.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/mapping/bidi/TestOneSidedParentChildWithImplicitForeignKey.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/mapping/bidi/TestOneSidedParentChildWithImplicitForeignKey.java Sat Oct 29 00:44:11 2011
@@ -70,8 +70,7 @@ public class TestOneSidedParentChildWith
 		MetaDataRepository repos = emf.getConfiguration()
 				.getMetaDataRepositoryInstance();
 		for (int i = 0; i < VALUE_STRATEGIES.length; i++) {
-            ClassMetaData meta = repos.getMetaData(PARENT_ID_TYPES[i], null,
-                    true);
+            ClassMetaData meta = repos.getMetaData(PARENT_ID_TYPES[i], true);
 			FieldMetaData fmd = meta.getPrimaryKeyFields()[0];
             assertEquals(fmd + " strategy is " + fmd.getValueStrategy(),
                     VALUE_STRATEGIES[i], fmd.getValueStrategy());

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJDBCType.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJDBCType.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJDBCType.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJDBCType.java Sat Oct 29 00:44:11 2011
@@ -70,7 +70,7 @@ public class TestJDBCType
         DBDictionary dict = conf.getDBDictionaryInstance();
         MappingRepository repos = conf.getMappingRepositoryInstance();
         repos.setStrategyInstaller(new RefreshStrategyInstaller(repos));
-        ClassMapping mapping = repos.getMapping(Column.class, null, true);
+        ClassMapping mapping = repos.getMapping(Column.class, true);
 
         Class cls;
         if (dict.getPreferredType(JavaSQLTypes.CLOB) ==  JavaSQLTypes.CLOB) {

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJoinToBaseClass.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJoinToBaseClass.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJoinToBaseClass.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJoinToBaseClass.java Sat Oct 29 00:44:11 2011
@@ -60,7 +60,7 @@ public class TestJoinToBaseClass
     public void testMapping() {
         ClassMapping mapping = ((JDBCConfiguration) getConfiguration()).
             getMappingRepositoryInstance().
-            getMapping(MappingTest5.class, null, true);
+            getMapping(MappingTest5.class, true);
 
         Table supTable = mapping.getPCSuperclassMapping().getTable();
         assertTrue(mapping.getTable() != supTable);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMappedByKeyMaps.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMappedByKeyMaps.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMappedByKeyMaps.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMappedByKeyMaps.java Sat Oct 29 00:44:11 2011
@@ -58,12 +58,10 @@ public class TestMappedByKeyMaps
     
     public void testInverseKeyMapMapping() {
         JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
-        ClassMapping pc = conf.getMappingRepositoryInstance().getMapping
-                (InverseKeyMapPC.class, null, true);
+        ClassMapping pc = conf.getMappingRepositoryInstance().getMapping(InverseKeyMapPC.class, true);
         FieldMapping map = pc.getFieldMapping("helpers");
         
-        ClassMapping helper = conf.getMappingRepositoryInstance().getMapping
-                (HelperPC.class, null, true);
+        ClassMapping helper = conf.getMappingRepositoryInstance().getMapping(HelperPC.class, true);
         FieldMapping str = helper.getFieldMapping("stringField");
         
         assertEquals("stringField", map.getKey().getValueMappedBy());
@@ -77,12 +75,10 @@ public class TestMappedByKeyMaps
     
     public void testJoinTableMapMapping() {
         JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
-        ClassMapping pc = conf.getMappingRepositoryInstance().getMapping
-                (JoinTableMapPC.class, null, true);
+        ClassMapping pc = conf.getMappingRepositoryInstance().getMapping(JoinTableMapPC.class, true);
         FieldMapping map = pc.getFieldMapping("helpers");
         
-        ClassMapping helper = conf.getMappingRepositoryInstance().getMapping
-                (HelperPC.class, null, true);
+        ClassMapping helper = conf.getMappingRepositoryInstance().getMapping(HelperPC.class, true);
         FieldMapping str = helper.getFieldMapping("stringField");
         
         assertEquals("stringField", map.getKey().getValueMappedBy());
@@ -257,13 +253,13 @@ public class TestMappedByKeyMaps
     
     private void setLRS(Class cls, boolean lrs) {
         ClassMapping cm = ((JDBCConfiguration) getConfiguration()).
-                getMappingRepositoryInstance().getMapping(cls, null, true);
+                getMappingRepositoryInstance().getMapping(cls, true);
         cm.getFieldMapping("helpers").setLRS(lrs);
     }
     
     private void unsetLRS(Class cls) {
         ClassMapping cm = ((JDBCConfiguration) getConfiguration()).
-                getMappingRepositoryInstance().getMapping(cls, null, true);
+                getMappingRepositoryInstance().getMapping(cls, true);
         cm.getFieldMapping("helpers").setLRS(false);
     }
     

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMetaDataValueIndicator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMetaDataValueIndicator.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMetaDataValueIndicator.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMetaDataValueIndicator.java Sat Oct 29 00:44:11 2011
@@ -62,7 +62,6 @@ public class TestMetaDataValueIndicator
     }
     
     public void setUp() {
-        // ### I hate that we have to do this
         Class c = MultiE.class;
         c = MultiF.class;
         
@@ -70,16 +69,13 @@ public class TestMetaDataValueIndicator
         
         eMapping =
             (ClassMapping) ((OpenJPAEntityManagerSPI) pm).getConfiguration().
-            getMetaDataRepositoryInstance().getMetaData(MultiE.class,
-            pm.getClassLoader(), true);
+            getMetaDataRepositoryInstance().getMetaData(MultiE.class, true);
         fMapping =
             (ClassMapping) ((OpenJPAEntityManagerSPI) pm).getConfiguration().
-            getMetaDataRepositoryInstance().getMetaData(MultiF.class,
-            pm.getClassLoader(), true);
+            getMetaDataRepositoryInstance().getMetaData(MultiF.class, true);
     }
     
-    public void tearDown()
-    throws Exception {
+    public void tearDown() throws Exception {
         if (pm.getTransaction().isActive())
             pm.getTransaction().rollback();
         pm.close();

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java Sat Oct 29 00:44:11 2011
@@ -992,7 +992,7 @@ public class TestOrderColumn extends Sin
         Class clazz, String fieldName) {
         JDBCConfiguration conf = (JDBCConfiguration) emf1.getConfiguration();
         ClassMapping cls = conf.getMappingRepositoryInstance().
-            getMapping(clazz, null, true);
+            getMapping(clazz, true);
         FieldMapping fm = cls.getFieldMapping(fieldName);
         Column oc = fm.getOrderColumn();
         assertNotNull(oc);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java Sat Oct 29 00:44:11 2011
@@ -65,7 +65,7 @@ public class TestOrderColumnXML extends 
         MetaDataRepository repos = conf.getMetaDataRepositoryInstance();
 
         // Force entity resolution
-        repos.getMetaData(BaseTestEntity2.class, null, true);
+        repos.getMetaData(BaseTestEntity2.class, true);
         
         OpenJPAEntityManagerSPI em = emf1.createEntityManager();
 
@@ -240,7 +240,7 @@ public class TestOrderColumnXML extends 
         MetaDataRepository repos = conf.newMetaDataRepositoryInstance();
 
         // Force entity resolution
-        repos.getMetaData(BaseTestEntity1.class, null, true);
+        repos.getMetaData(BaseTestEntity1.class, true);
 
         XMLPersistenceMappingSerializer ser =
             new XMLPersistenceMappingSerializer((JDBCConfiguration)conf);
@@ -256,7 +256,7 @@ public class TestOrderColumnXML extends 
         MetaDataRepository mdr2 = parser.getRepository();
 
         ClassMetaData _entityMeta2 = 
-            mdr2.getMetaData(BaseTestEntity1.class, null, true);
+            mdr2.getMetaData(BaseTestEntity1.class, true);
 
         // Assert metadata is populated correctly
         FieldMapping fm = (FieldMapping)_entityMeta2.getField("one2Melems");
@@ -286,7 +286,7 @@ public class TestOrderColumnXML extends 
         Class clazz, String fieldName) {
         JDBCConfiguration conf = (JDBCConfiguration) emf1.getConfiguration();
         ClassMapping cls = conf.getMappingRepositoryInstance().
-            getMapping(clazz, null, true);
+            getMapping(clazz, true);
         FieldMapping fm = cls.getFieldMapping(fieldName);
         Column oc = fm.getOrderColumn();
         assertNotNull(oc);

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/JDBCTestCase.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/JDBCTestCase.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/JDBCTestCase.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/JDBCTestCase.java Sat Oct 29 00:44:11 2011
@@ -62,8 +62,7 @@ public abstract class JDBCTestCase exten
     
     public ClassMapping getClassMapping(Class c) {
         OpenJPAConfiguration jdoConf = getConfiguration();
-        return ((JDBCConfiguration) jdoConf).getMappingRepositoryInstance().
-                getMapping(c, getClass().getClassLoader(), true);
+        return ((JDBCConfiguration) jdoConf).getMappingRepositoryInstance().getMapping(c, true);
     }
     
     public FieldMapping getFieldMapping(Class c, String field) {

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestSQLQueries.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestSQLQueries.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestSQLQueries.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestSQLQueries.java Sat Oct 29 00:44:11 2011
@@ -90,8 +90,7 @@ public class TestSQLQueries
             .getConfiguration();
         DBDictionary dict = conf.getDBDictionaryInstance();
         MappingRepository repos = conf.getMappingRepositoryInstance();
-        ClassMapping mapping = repos.getMapping(RuntimeTest1.class,
-                pm.getClassLoader(), true);
+        ClassMapping mapping = repos.getMapping(RuntimeTest1.class, true);
         
         _tableName = mapping.getTable().getName();
         _fullTableName = dict.getFullName(mapping.getTable(), false);
@@ -382,15 +381,13 @@ public class TestSQLQueries
         DBDictionary dict = conf.getDBDictionaryInstance();
         MappingRepository repos = conf.getMappingRepositoryInstance();
         
-        ClassMapping mappingA = repos.getMapping(AttachD.class,
-                pm.getClassLoader(), true);
+        ClassMapping mappingA = repos.getMapping(AttachD.class, true);
         String tableNameA = mappingA.getTable().getName();
         String fullTableNameA = dict.getFullName(mappingA.getTable(), false);
         String relColNameA = mappingA.getFieldMapping("a").
                 getColumns()[0].getName();
         
-        ClassMapping mappingD = repos.getMapping(AttachA.class,
-                pm.getClassLoader(), true);
+        ClassMapping mappingD = repos.getMapping(AttachA.class, true);
         String tableNameD = mappingD.getTable().getName();
         String fullTableNameD = dict.getFullName(mappingD.getTable(), false);
         String pkColNameD = mappingD.getTable().getPrimaryKey().

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassDBSequenceFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassDBSequenceFactory.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassDBSequenceFactory.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassDBSequenceFactory.java Sat Oct 29 00:44:11 2011
@@ -226,7 +226,7 @@ public class TestClassDBSequenceFactory
                 ClassMapping mapping =
                         ((JDBCConfiguration) _broker.getConfiguration()).
                         getMappingRepositoryInstance().
-                        getMapping(SeqD.class, null, true);
+                        getMapping(SeqD.class, true);
                 ClassTableJDBCSeq seq = (ClassTableJDBCSeq)
                 _broker.getIdentitySequence(mapping);
                 for (int i = 0; i < 51; i++)

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassSequenceFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassSequenceFactory.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassSequenceFactory.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassSequenceFactory.java Sat Oct 29 00:44:11 2011
@@ -135,11 +135,11 @@ public class TestClassSequenceFactory ex
             return;
         
         ClassMapping aMapping = conf.getMappingRepositoryInstance().
-                getMapping(SeqA.class, null, true);
+                getMapping(SeqA.class, true);
         ClassMapping bMapping = conf.getMappingRepositoryInstance().
-                getMapping(SeqB.class, null, true);
+                getMapping(SeqB.class, true);
         ClassMapping cMapping = conf.getMappingRepositoryInstance().
-                getMapping(SeqC.class, null, true);
+                getMapping(SeqC.class, true);
         DataSource ds = conf.getDataSource2(null);
         
         // hold a and c and start b
@@ -192,7 +192,7 @@ public class TestClassSequenceFactory ex
             try {
                 Seq seq = _conf.getSequenceInstance();
                 ClassMapping mapping = _conf.getMappingRepositoryInstance().
-                        getMapping(SeqA.class, null, true);
+                        getMapping(SeqA.class, true);
                 for (int i = 0; i < 51; i++)
                     _set.add(seq.next(_broker, mapping));
             } catch (Exception e) {

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDBSequenceFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDBSequenceFactory.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDBSequenceFactory.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDBSequenceFactory.java Sat Oct 29 00:44:11 2011
@@ -105,7 +105,7 @@ public class TestDBSequenceFactory
                 for (int i = 0; i < 51; i++)
                     _set.add(seq.next(_broker, 
                         conf.getMetaDataRepositoryInstance().
-                        getMetaData(RuntimeTest1.class, null, true)));
+                        getMetaData(RuntimeTest1.class, true)));
             } catch (Exception e) {
                 throw new RuntimeException(e.getMessage());
             }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDynamicSchemaFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDynamicSchemaFactory.java?rev=1190716&r1=1190715&r2=1190716&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDynamicSchemaFactory.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDynamicSchemaFactory.java Sat Oct 29 00:44:11 2011
@@ -67,7 +67,7 @@ public class TestDynamicSchemaFactory
         JDBCConfiguration conf = new JDBCConfigurationImpl();
         conf.setSchemaFactory(DynamicSchemaFactory.class.getName());
         MappingRepository repos = conf.newMappingRepositoryInstance();
-        _mapping = repos.getMapping(MappingTest1.class, null, true);
+        _mapping = repos.getMapping(MappingTest1.class, true);
     }
 
     public void testClassMapping() {



Mime
View raw message