OPENJPA-437

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@615360 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2008-01-25 21:52:05 +00:00
parent 2a612c1053
commit 78f5a95b2b
1 changed files with 4 additions and 3 deletions

View File

@ -148,7 +148,7 @@ public abstract class AbstractBrokerFactory
*/
protected AbstractBrokerFactory(OpenJPAConfiguration config) {
_conf = config;
_pcClassLoaders = new ReferenceHashSet(ReferenceHashSet.WEAK);
_pcClassLoaders = new ConcurrentReferenceHashSet(ReferenceHashSet.WEAK);
}
/**
@ -280,15 +280,16 @@ 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();
_pcClassNames.add(cls.getName());
c.add(cls.getName());
if (needsSub(cls))
toRedefine.add(cls);
}
_pcClassLoaders.add(loader);
_pcClassNames = c;
}
_persistentTypesLoaded = true;
} else {