Author: kkolinko
Date: Thu Jul 17 20:59:03 2014
New Revision: 1611475
URL: http://svn.apache.org/r1611475
Log:
Fix "No context found:" warnings from Mapper.addWrappers() ->
findContextVersion() during context startup.
If context has not been started yet, its "AFTER_START" lifecycle event will
come later.
It is backport of r1610244
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java?rev=1611475&r1=1611474&r2=1611475&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
Thu Jul 17 20:59:03 2014
@@ -156,7 +156,11 @@ public class MapperListener extends Life
} else if (child instanceof Context) {
registerContext((Context) child);
} else if (child instanceof Wrapper) {
- registerWrapper((Wrapper) child);
+ // Only if the Context has started. If it has not, then it
+ // will have its own "after_start" life-cycle event later.
+ if (child.getParent().getState().isAvailable()) {
+ registerWrapper((Wrapper) child);
+ }
}
}
} else if (Container.REMOVE_CHILD_EVENT.equals(event.getType())) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]