openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r596871 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java
Date Tue, 20 Nov 2007 23:12:34 GMT
Author: ppoddar
Date: Tue Nov 20 15:12:33 2007
New Revision: 596871

URL: http://svn.apache.org/viewvc?rev=596871&view=rev
Log:
OPENJPA-449 : initializing _pcClassLoaders in constructor instead of conditionally inside
loadPersistentTypes(). Saves NPE on new Broker construction in multi-threaded scenarios' openjpa-kernel\src\main\java\org\apache\openjpa\kernel\AbstractBrokerFactory.java

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java?rev=596871&r1=596870&r2=596871&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java
Tue Nov 20 15:12:33 2007
@@ -134,6 +134,7 @@
      */
     protected AbstractBrokerFactory(OpenJPAConfiguration config) {
         _conf = config;
+        _pcClassLoaders = new ReferenceHashSet(ReferenceHashSet.WEAK);
     }
 
     /**
@@ -255,7 +256,6 @@
                     if (needsSub(cls))
                         toRedefine.add(cls);
                 }
-                _pcClassLoaders = new ReferenceHashSet(ReferenceHashSet.WEAK);
                 _pcClassLoaders.add(loader);
             }
         } else {



Mime
View raw message