From 05d783077572ca4c75a8881a5f4bfeaa5babd5ee Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 2 May 2010 14:25:42 +0000 Subject: [PATCH] Clean-up post init/destroy lifecycle refactoring By default, remove children on destroy, not stop git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@940236 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/core/ContainerBase.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/org/apache/catalina/core/ContainerBase.java b/java/org/apache/catalina/core/ContainerBase.java index 476e8b977..d6dff03e9 100644 --- a/java/org/apache/catalina/core/ContainerBase.java +++ b/java/org/apache/catalina/core/ContainerBase.java @@ -1022,11 +1022,6 @@ public abstract class ContainerBase extends LifecycleBase 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 extends LifecycleBase @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 { -- 2.11.0