Don't register Contexts that fail to start with the Mapper.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 25 Mar 2011 21:59:07 +0000 (21:59 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 25 Mar 2011 21:59:07 +0000 (21:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1085574 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/MapperListener.java
webapps/docs/changelog.xml

index c461967..a716a69 100644 (file)
@@ -290,7 +290,9 @@ public class MapperListener extends LifecycleMBeanBase
         mapper.addHost(host.getName(), aliases, host);
         
         for (Container container : host.findChildren()) {
-            registerContext((Context) container);
+            if (container.getState().isAvailable()) {
+                registerContext((Context) container);
+            }
         }
         if(log.isDebugEnabled()) {
             log.debug(sm.getString("mapperListener.registerHost",
index add6993..62a3a4c 100644 (file)
@@ -91,6 +91,9 @@
         (greater than 100ms) at INFO level and provide a value for the message
         key so a meaningful message appears in the logs. (markt)
       </fix>
+      <fix>
+        Don&apos;t register Contexts that fail to start with the Mapper. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">