Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49530
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 2 Jul 2010 18:04:14 +0000 (18:04 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 2 Jul 2010 18:04:14 +0000 (18:04 +0000)
Make sure children are stopped if they are running when the parent stops.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@960076 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/ContainerBase.java
webapps/docs/changelog.xml

index b23af4c..33e4900 100644 (file)
@@ -915,14 +915,12 @@ public abstract class ContainerBase extends LifecycleMBeanBase
             children.remove(child.getName());
         }
         
-        if (getState().isAvailable()) {
-            try {
-                if (child.getState().isAvailable()) {
-                    child.stop();
-                }
-            } catch (LifecycleException e) {
-                log.error("ContainerBase.removeChild: stop: ", e);
+        try {
+            if (child.getState().isAvailable()) {
+                child.stop();
             }
+        } catch (LifecycleException e) {
+            log.error("ContainerBase.removeChild: stop: ", e);
         }
         
         fireContainerEvent(REMOVE_CHILD_EVENT, child);
index 1bd0083..9671a4d 100644 (file)
         rather than an empty string. (markt)
       </fix>
       <fix>
+        <bug>49530</bug>: Contexts and Servlets not stopped when Tomcat is shut
+        down. (markt)
+      </fix>
+      <fix>
         <bug>49536</bug>: If no ROOT context is deployed, ensure a 404 rather
         than a 200 is returned for requests that don't map to any other context.
         (markt)