From ce44c20cbd31287bd7b03aea7ff94692687c9a5f Mon Sep 17 00:00:00 2001 From: Patrick Linskey Date: Fri, 25 Jan 2008 21:59:50 +0000 Subject: [PATCH] OPENJPA-437 git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@615368 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/openjpa/kernel/AbstractBrokerFactory.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java index 2c398a795..940ab4382 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java @@ -46,7 +46,6 @@ import org.apache.openjpa.event.BrokerFactoryEvent; import org.apache.openjpa.lib.log.Log; import org.apache.openjpa.lib.util.J2DoPrivHelper; import org.apache.openjpa.lib.util.Localizer; -import org.apache.openjpa.lib.util.ReferenceHashSet; import org.apache.openjpa.lib.util.JavaVersions; import org.apache.openjpa.lib.util.concurrent.ConcurrentHashMap; import org.apache.openjpa.lib.util.concurrent.ConcurrentReferenceHashSet; @@ -134,7 +133,8 @@ public abstract class AbstractBrokerFactory */ protected AbstractBrokerFactory(OpenJPAConfiguration config) { _conf = config; - _pcClassLoaders = new ReferenceHashSet(ReferenceHashSet.WEAK); + _pcClassLoaders = new ConcurrentReferenceHashSet( + ConcurrentReferenceHashSet.WEAK); } /** @@ -256,7 +256,7 @@ public abstract class AbstractBrokerFactory 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(); @@ -265,6 +265,7 @@ public abstract class AbstractBrokerFactory toRedefine.add(cls); } _pcClassLoaders.add(loader); + _pcClassNames = c; } _persistentTypesLoaded = true; } else {