openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r615360 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java
Date Fri, 25 Jan 2008 21:52:06 GMT
Author: pcl
Date: Fri Jan 25 13:52:05 2008
New Revision: 615360

URL: http://svn.apache.org/viewvc?rev=615360&view=rev
Log:
OPENJPA-437

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=615360&r1=615359&r2=615360&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
Fri Jan 25 13:52:05 2008
@@ -148,7 +148,7 @@
      */
     protected AbstractBrokerFactory(OpenJPAConfiguration config) {
         _conf = config;
-        _pcClassLoaders = new ReferenceHashSet(ReferenceHashSet.WEAK);
+        _pcClassLoaders = new ConcurrentReferenceHashSet(ReferenceHashSet.WEAK);
     }
 
     /**
@@ -280,15 +280,16 @@
             if (clss.isEmpty())
                 _pcClassNames = Collections.EMPTY_SET;
             else {
-                _pcClassNames = new ConcurrentReferenceHashSet(
+                Collection c = new ConcurrentReferenceHashSet(
                     ConcurrentReferenceHashSet.HARD);
                 for (Iterator itr = clss.iterator(); itr.hasNext();) {
                     Class cls = (Class) itr.next();
-                    _pcClassNames.add(cls.getName());
+                    c.add(cls.getName());
                     if (needsSub(cls))
                         toRedefine.add(cls);
                 }
                 _pcClassLoaders.add(loader);
+                _pcClassNames = c;
             }
             _persistentTypesLoaded = true;
         } else {



Mime
View raw message