|
From: Chris N. <ch...@si...> - 2004-10-19 19:32:50
|
Rob Rudin wrote: > Is there any chance that this will eventually be fixed in CGLIB? > We can get by with one context for all test methods, but as you > state, it would be nice for it not to be a problem when each > test method does need to create its own context. CGLIB keeps an internal WeakReference-based per-ClassLoader cache of all generated classes, and tries to use it whenever possible. But if anything about the requested proxy changes, it does the safe thing and generates a new class. As Rob Harrop alluded to, for CGLIB to realize that one proxy is the same as another, among other things the Callback and CallbackFilter objects must implement equals/hashCode properly. Hibernate may have some issues in this regard, so you may want to file a bug with them. Chris |