[jboss-user] [JBoss Microcontainer Development] - Classloading and caching changes

Ales Justin do-not-reply at jboss.com
Fri May 14 10:24:30 EDT 2010

Ales Justin [http://community.jboss.org/people/alesj] replied to the discussion

"Classloading and caching changes"

To view the discussion, visit: http://community.jboss.org/message/543108#543108

> i) it doesn't differentiate what is loaded before or after the load fromthe target domain
> ii) it complicates the flushing in the event that the parent domain gets
> flushed, e.g. a classloader is removed from the parent domain
Hmmm ... this code needs fixing then. ;-)

     // Should we directly load from the parent?
     if (findInParent == false)
        Class<?> clazz = loadClassBefore(name);
        if (clazz != null)
           globalClassCache.put(path, new ClassCacheItem(clazz)); // REMOVE
           return clazz;

We as a child don't know when a parent domain has a classloader removed
and therefore the cached result is invalid.
It could do if the parent domain flushed all the caches in its child domains, but it doesn't do that currently.
But even then the globalClassCache wouldn't differentiate the before/after rules.


Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer Development at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100514/c932d131/attachment-0001.html 

More information about the jboss-user mailing list