Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 19444 invoked from network); 5 Aug 2004 19:35:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Aug 2004 19:35:47 -0000 Received: (qmail 95733 invoked by uid 500); 5 Aug 2004 19:35:34 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 95560 invoked by uid 500); 5 Aug 2004 19:35:33 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 95547 invoked by uid 99); 5 Aug 2004 19:35:33 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.27.1) with SMTP; Thu, 05 Aug 2004 12:35:30 -0700 Received: (qmail 24195 invoked by uid 50); 5 Aug 2004 19:37:01 -0000 Date: 5 Aug 2004 19:37:01 -0000 Message-ID: <20040805193701.24194.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 27371] - java.lang.ThreadDeath caused by log4j when reloading Tomcat app X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=27371 java.lang.ThreadDeath caused by log4j when reloading Tomcat app ------- Additional Comments From yoavs@computer.org 2004-08-05 19:36 ------- --- Begin Text by Craig McClanahan --- The reason that LogFactory instances are stored in a map keyed by context class loader was to meet a functional requirement that each webapp could have independently configured constellations of Log instances, created by independent LogFactory instances, per webapp -- even if commons-logging.jar itself is installed into a shared class loader (i.e. common/lib or shared/lib in Tomcat). This is why you can't just use a static variable, because there would only be one LogFactory instance across the entire Tomcat JVM. In addition, there is no other reasonable key that is specific to a webapp, but *not* specific to the Servlet API (tying commons-logging use to require servlet.jar would not be a good thing). In order to allow cleanup of these allocated instances, the LogFactory.release() method may be used to ask a LogFactory to release all of its Log instances. In addition, the static LogFactory.release(ClassLoader) method releases references to the LogFactory instance for that class loader. I believe that both of these APIs were just added in 1.0.4. Inside Tomcat, then, a webapp using c-l can add a ServletContextListener whose contextDestroyed() method calls the appropriate release methods to clean up. --- End text by Craig McClanahan --- So to the people who reported this: please try adding such a ServletContextListener and using the above methods that Craig mentioned, and let us know if that makes the error go away. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org