tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: svn commit: r531306 - in /tomcat: container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ container/tc5.5.x/catalina/src/share/org/apache/catalina/session/ container/tc5.5.x/webapps/docs/ jasper/tc5.5.x/src/share/org/apache/jasper/runtime/
Date Mon, 23 Apr 2007 01:31:03 GMT
Mark Thomas wrote:
> Remy Maucherat wrote:
>> wrote:
>>> Fix some logging related memory leaks. This fixes 41272 and the root
>> -1. Getting a logger has, AFAIK, a possibly significant cost. Since
>> getting a RD is a very common option, this is not acceptable.
> I took a look at the commons-logging code. The first call for a
> context will be expensive as the logger has to be created. After that
> it is:
>  - one call to getContextClassLoader() (via reflection)
>  - two hashtable look ups
>  - some wrapper code
> I knew it used getContextClassLoader(). I didn't realise it was via
> reflection so I agree with you about the performance hit.

This is still far more than what should happen (nothing). I did provide 
suggestions to write an equivalent patch which would not suffer from the 
problem, so I maintain my veto.

>> If you really want to fix this non issue (which will simply happen
>> elsewhere in more insidious form),
> I don't view memory leaks and loggers for one context logging messages
> for a different context a non-issue. Given all it takes for this to
> occur is to put log4j in a webapp this is likely to affect a lot of
> people - including me ;). I am happy to spend the time fixing these
> issues and any others that crop up in the future.

All I'm asking in the end if you really want to do it for some reason is 
that you find a mutually acceptable way.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message