Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 33247 invoked from network); 2 May 2010 14:26:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 May 2010 14:26:37 -0000 Received: (qmail 86803 invoked by uid 500); 2 May 2010 14:26:36 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 86731 invoked by uid 500); 2 May 2010 14:26:36 -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 86721 invoked by uid 99); 2 May 2010 14:26:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 May 2010 14:26:35 +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; Sun, 02 May 2010 14:26:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E9890238897A; Sun, 2 May 2010 14:25:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r940236 - /tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Date: Sun, 02 May 2010 14:25:42 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100502142542.E9890238897A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Sun May 2 14:25:42 2010 New Revision: 940236 URL: http://svn.apache.org/viewvc?rev=940236&view=rev Log: Clean-up post init/destroy lifecycle refactoring By default, remove children on destroy, not stop Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=940236&r1=940235&r2=940236&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Sun May 2 14:25:42 2010 @@ -1022,11 +1022,6 @@ public abstract class ContainerBase exte for (int i = 0; i < children.length; i++) { children[i].stop(); } - // Remove children - so next start can work - children = findChildren(); - for (int i = 0; i < children.length; i++) { - removeChild(children[i]); - } // Stop our subordinate components, if any if ((resources != null) && (resources instanceof Lifecycle)) { @@ -1094,6 +1089,11 @@ public abstract class ContainerBase exte @Override protected void destroyInternal() throws LifecycleException { + // Remove children now this container is being destroyed + for (Container child : findChildren()) { + child.destroy(); + } + // unregister this component if ( oname != null ) { try { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org