I am attaching a patch (BulkBean.diff)
that fixes the problem reported in this bug report:
http://sourceforge.net/tracker/index.php?func=detail&aid=1257327&group_id=56933&atid=482368
It is similar to the fix done in the Enhancer 3 months ago.
http://cvs.sourceforge.net/viewcvs.py/cglib/cglib/src/proxy/net/sf/cglib/proxy/Enhancer.java?only_with_tag=RELEASE_2_1_1
Except it is for the BulkBeanKey processing.
The underlying issue is that you have
Source -> WeakHashMap<classloader, map>
with the map holding
BulkBeanKey -> SoftReference(generated class)
But the generated BulkBeanKey holds hard links
to the original classes (target and types).
Using the class names fixes the problem. Since the cache
is already keyed by the classloader the class namespace
must be unique because of JVM loader constraints.
See this related JBoss issue:
http://jira.jboss.com/jira/browse/JBAS-2256