tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: More Caching for WebappClassLoader?
Date Wed, 11 Jan 2012 01:14:09 GMT
Rainer,

On 1/10/12 5:37 PM, Rainer Jung wrote:
> It would matter if they take the reedom to return something new if
> loadClass() is called for a class that was already loaded - and
> something changed for the CL. For example a custom CL could check every
> now and then whether the classes have dynamically changed and then
> return the new ones. If we cache the first result of loadClass() in our
> loader higher up the hierarchy, the custom CL lower down will never be
> called again for the class and wouldn't be able to update it.

I'm not sure why a custom CL would be "lower" in the hierarchy than the
WebappClassLoader but then also not have first-crack at loading the
classes it had originally loaded. If the CL follows parent-first
semantics then this might be a problem, but if the CL follows me-first
semantics, then this will not be a problem.

> Right, that's what I wanted to say. So at the end it might be a few
> thousands of pointers.

Yeah, that's not that big of a deal when the alternative is what amounts
to CL thrashing :)

-chris


Mime
View raw message