Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B308B0A7 for ; Thu, 12 Jan 2012 20:34:47 +0000 (UTC) Received: (qmail 34153 invoked by uid 500); 12 Jan 2012 20:34:46 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 33961 invoked by uid 500); 12 Jan 2012 20:34:45 -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 33952 invoked by uid 99); 12 Jan 2012 20:34:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2012 20:34:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.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; Thu, 12 Jan 2012 20:34:45 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DF40F23888D2 for ; Thu, 12 Jan 2012 20:34:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1230765 - in /tomcat/trunk/java/org/apache/catalina/core: ContainerBase.java StandardContext.java Date: Thu, 12 Jan 2012 20:34:24 -0000 To: dev@tomcat.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120112203424.DF40F23888D2@eris.apache.org> Author: markt Date: Thu Jan 12 20:34:24 2012 New Revision: 1230765 URL: http://svn.apache.org/viewvc?rev=1230765&view=rev Log: Move destruction of ContainerBase objects to ContainerBase to ensure that they are destroyed. Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java tomcat/trunk/java/org/apache/catalina/core/StandardContext.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=1230765&r1=1230764&r2=1230765&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Thu Jan 12 20:34:24 2012 @@ -1195,6 +1195,20 @@ public abstract class ContainerBase exte @Override protected void destroyInternal() throws LifecycleException { + if ((manager != null) && (manager instanceof Lifecycle)) { + ((Lifecycle) manager).destroy(); + } + Realm realm = getRealmInternal(); + if ((realm != null) && (realm instanceof Lifecycle)) { + ((Lifecycle) realm).destroy(); + } + if ((cluster != null) && (cluster instanceof Lifecycle)) { + ((Lifecycle) cluster).destroy(); + } + if ((loader != null) && (loader instanceof Lifecycle)) { + ((Lifecycle) loader).destroy(); + } + // Stop the Valves in our pipeline (including the basic), if any if (pipeline instanceof Lifecycle) { ((Lifecycle) pipeline).destroy(); Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1230765&r1=1230764&r2=1230765&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Thu Jan 12 20:34:24 2012 @@ -5450,20 +5450,6 @@ public class StandardContext extends Con @Override protected void destroyInternal() throws LifecycleException { - if ((manager != null) && (manager instanceof Lifecycle)) { - ((Lifecycle) manager).destroy(); - } - Realm realm = getRealmInternal(); - if ((realm != null) && (realm instanceof Lifecycle)) { - ((Lifecycle) realm).destroy(); - } - if ((cluster != null) && (cluster instanceof Lifecycle)) { - ((Lifecycle) cluster).destroy(); - } - if ((loader != null) && (loader instanceof Lifecycle)) { - ((Lifecycle) loader).destroy(); - } - // If in state NEW when destroy is called, the object name will never // have been set so the notification can't be created if (getObjectName() != null) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org