Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 25773 invoked from network); 24 Aug 2010 21:09:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Aug 2010 21:09:54 -0000 Received: (qmail 26977 invoked by uid 500); 24 Aug 2010 21:09:53 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 26857 invoked by uid 500); 24 Aug 2010 21:09:53 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 26848 invoked by uid 99); 24 Aug 2010 21:09:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Aug 2010 21:09:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Aug 2010 21:09:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 11B9423888EA; Tue, 24 Aug 2010 21:08:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r988729 - in /tomcat/trunk: java/org/apache/catalina/startup/ContextConfig.java java/org/apache/catalina/startup/LocalStrings.properties webapps/docs/changelog.xml Date: Tue, 24 Aug 2010 21:08:34 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100824210835.11B9423888EA@eris.apache.org> Author: markt Date: Tue Aug 24 21:08:34 2010 New Revision: 988729 URL: http://svn.apache.org/viewvc?rev=988729&view=rev Log: Fix memory leak on context stop Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=988729&r1=988728&r2=988729&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue Aug 24 21:08:34 2010 @@ -58,6 +58,7 @@ import org.apache.catalina.Globals; import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; +import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Pipeline; import org.apache.catalina.Valve; @@ -299,6 +300,7 @@ public class ContextConfig * * @param event The lifecycle event that has occurred */ + @Override public void lifecycleEvent(LifecycleEvent event) { // Identify the context we are associated with @@ -929,6 +931,12 @@ public class ContextConfig Container[] children = context.findChildren(); for (i = 0; i < children.length; i++) { context.removeChild(children[i]); + try { + children[i].destroy(); + } catch (LifecycleException e) { + log.warn(sm.getString("contentConfig.destroyChildFailed", + children[1].getName(), context.getName()), e); + } } // Removing application parameters Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=988729&r1=988728&r2=988729&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Tue Aug 24 21:08:34 2010 @@ -35,6 +35,7 @@ contextConfig.defaultError=Error process contextConfig.defaultMissing=No global web.xml found contextConfig.defaultPosition=Occurred at line {0} column {1} contextConfig.destroy=ContextConfig: Destroying +contentConfig.destroyChildFailed=Failed to destroy child [{0}] of context [{1}] contextConfig.fileUrl=Unable to create a File object from the URL [{0}] contextConfig.fixDocBase=Exception fixing docBase for context [{0}] contextConfig.init=ContextConfig: Initializing Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=988729&r1=988728&r2=988729&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Aug 24 21:08:34 2010 @@ -84,6 +84,11 @@ CSRF prevention filter did not correctly handle URLs that used anchors. (markt) + + Fix memory leak on web application stopped caused by failed to + de-register the web application's Servlets with the MBean server. + (markt) + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org