Hola, >i'm not sure i understand what ceki's point is. i can't see that he >gives any reason for pointing the finger in the way he does. maybe if >ceki explained how using classloaders as keys effects log4j, i'd see a >bit better...
The issue is: - Web application deployed on Tomcat uses log4j via commons-logging - When said application is restarted (using one of the methods provided by Tomcat do restart a webapp without restarting the Tomcat server itself), a java.lang.ThreadDeath exception is thrown when commons-logging calls a log4j logging function. - We suspect this exception is thrown by Tomcat because the ClassLoader used by commons-logging to load the log4j class is invalid. But it's still the cache key in the commons-logging cache. It's invalid because when restarting a webapp Tomcat provides it with a new set of classloaders per the Servlet Specification. >the commons-logging classloader stuff was created IIRC by craig, remy >and others. i don't feel qualified to second-guess their knowledge of >servlet containers. You recall correctly as far as Craig ;) We're not second-guessing their knowledge or even their implementation. But the Tomcat webapp reloading code has evolved sufficiently since the initial creation of commons-logging's cache implementation that now the two are not playing perfectly together. >i've wanted for a while to use a WeakHashMap so that old classloaders >who be garbage collected but don't see that there's an easy way to do >this without breaking compatibility. What would break if we switched commons-logging to use such a WeakHashMap instead of the currently used normal HashMap? Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
