[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: UnwrapValueUnitTestCase.testCollectionUnwrap failure on
adrian@jboss.org
do-not-reply at jboss.com
Thu Nov 20 10:33:37 EST 2008
"alesj" wrote : "alesj" wrote :
| | What about if I just change that the key is ClassInfo instead of String?
| | (I've done that locally and all the tests pass)
| Actually I think I can drop the whole ClassLoader as key,
| since ClassInfo is per ClassLoader if I'm not mistaken.
|
But you still have the problem that ClassInfos can be transient.
Let's go with that, but we need to do so extra work to see whether all this
caching is (still) effective.
I think in practice it will work for most of the ClassInfos we use to create beans
since the WeakTypeCache will hold a reference to the TypeInfo until the bean's class
is GCed.
But for more transient bean classes, e.g. those used only in the managed object layer
it might not be as good?
If only there was a combination Weak/SoftReference mechanism
which let you do SoftReference behaviour until the classloader gets GCed
then it turns into WeakReference behaviour. ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190936#4190936
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190936
More information about the jboss-dev-forums
mailing list