Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 64292 invoked from network); 28 Sep 2005 19:08:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Sep 2005 19:08:46 -0000 Received: (qmail 19180 invoked by uid 500); 28 Sep 2005 19:08:41 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 19136 invoked by uid 500); 28 Sep 2005 19:08:39 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 19123 invoked by uid 99); 28 Sep 2005 19:08:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2005 12:08:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.36] (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Sep 2005 12:08:44 -0700 Received: from phys-d3-ha21sca-2 ([129.145.155.165]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id j8SJ8GvD009127 for ; Wed, 28 Sep 2005 13:08:17 -0600 (MDT) Received: from conversion-daemon.ha21sca-mail1.sfbay.sun.com by ha21sca-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0INJ00C01JQFOE@ha21sca-mail1.sfbay.sun.com> (original mail from Jan.Luehe@Sun.COM) for tomcat-dev@jakarta.apache.org; Wed, 28 Sep 2005 12:08:29 -0700 (PDT) Received: from sun.com (sr1-umpk-19.SFBay.Sun.COM [129.146.11.205]) by ha21sca-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0INJ000EGJU49K@ha21sca-mail1.sfbay.sun.com> for tomcat-dev@jakarta.apache.org; Wed, 28 Sep 2005 12:08:28 -0700 (PDT) Date: Wed, 28 Sep 2005 12:08:13 -0700 From: Jan Luehe Subject: Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java In-reply-to: <433AD058.6040601@apache.org> To: Tomcat Developers List Reply-to: Jan.Luehe@Sun.COM Message-id: <433AEA1D.1070307@sun.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: QUOTED-PRINTABLE X-Accept-Language: en-US User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20041214 References: <20050927234253.87444.qmail@minotaur.apache.org> <433A6C8D.9040707@apache.org> <433ACE26.6030201@sun.com> <433AD058.6040601@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Remy, Remy Maucherat wrote On 09/28/05 10:18,: > Jan Luehe wrote: >=20 >>We have seen the ThreadDeath in our callstacks, hence this fix. >=20 >=20 > Nobody is reading what I am writing anymore ... No, I did. > I wrote: > The static initializer is called when loading the class, and obviou= sly=20 > the webapp CL is not going to load IntrospectionUtils. >=20 > IntrospectionUtils will be loaded once, and its static initializer = run=20 > once. Yes, but with lazy resolution, it will be loaded when the IntrospectionUtils symbol is first encountered, which may be inside WebappClassLoader.stop(). IntrospectionUtils' static initializer will cause an invocation of loadClass() on the thread's context classloader, which corresponds to the WebappClassLoader, whose loadClass() throws ThreadDeath when its "started" flag has been set to FALSE. Therefore, we must avoid referencing IntrospectionUtils in WebappClassLoader.stop() after the "started" flag has been set to FALSE. > So I am ok with your fix, but I don't understand how it can occur= =20 > in regular Tomcat. It's probably not occurring in standalone Tomcat, but only in "embedded" Tomcat. In standalone Tomcat, IntrospectionUtils is probably getting resolved (and its static initializer invoked) prior to calling WebappClassLoader.stop(), whereas in "embedded" mode, IntrospectionUtils is first referenced and loaded by WebappClassLoader.stop(). > The big comment block is quite pointless, as it tries to be=20 > informational, but doesn't correspond to reality (I am personally= =20 > against this kind of "commit message duplication" comment). Sure, I just thought this line might be an easy candidate for being moved around if there was no comment. > As a reminder, CVS shound't be used anymore. Yes. Jan >=20 > R=E9my >=20 > -------------------------------------------------------------------= -- > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org