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/543109#543109
--------------------------------------------------------------
Whether it caches things is decided elsewhere, based on the
ClassLoaderPolicy rules.
This code is just a safety check in the event that the class changes
(somebody redeployed a classloader) and the global cache hasn't been flushed
properly.
As I said on the other response, it can't cache the load in that
"globalClassCache", because
the classloader used is in the parent domain. It would need some complicated
flushing rules to cache it in the child domain as well - not my preferred solution.
"the classloader used is in the parent domain"
But this isn't always the case?
Only for this piece:
// Try the before attempt (e.g. from the parent)
Loader loader = null;
if (findInParent)
loader = findBeforeLoader(name);
if (loader != null)
return loader;
But this could be cached -- if the policy permits it?
// Next use any requesting classloader, this will look at everything not just what
it exports
if (classLoader != null)
{
if (trace)
log.trace(this + " trying to load " + name + " from requesting
" + classLoader);
if (classLoader.getResourceLocally(name) != null)
return classLoader.getLoader();
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/543109#543109]
Start a new discussion in JBoss Microcontainer Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]