tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r940236 - /tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
Date Sun, 02 May 2010 14:25:42 GMT
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


Mime
View raw message