From: markt Date: Fri, 2 Jul 2010 18:04:14 +0000 (+0000) Subject: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49530 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=1176f45e4868161ca111d5689e81ebfcccbe27d1;p=tomcat7.0 Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49530 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 --- diff --git a/java/org/apache/catalina/core/ContainerBase.java b/java/org/apache/catalina/core/ContainerBase.java index b23af4ce7..33e490002 100644 --- a/java/org/apache/catalina/core/ContainerBase.java +++ b/java/org/apache/catalina/core/ContainerBase.java @@ -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); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 1bd00834b..9671a4dde 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -84,6 +84,10 @@ rather than an empty string. (markt) + 49530: Contexts and Servlets not stopped when Tomcat is shut + down. (markt) + + 49536: 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)