Author: kkolinko
Date: Tue Jan 8 08:52:07 2013
New Revision: 1430173
URL: http://svn.apache.org/viewvc?rev=1430173&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54380
In MapperListener.lifecycleEvent(): call registerWrapper(), registerContext()
only if the parent component has already been started.
It is backport of r1430147 from tomcat/trunk.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/MapperListener.java
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1430147
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=1430173&r1=1430172&r2=1430173&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
Tue Jan 8 08:52:07 2013
@@ -434,9 +434,19 @@ public class MapperListener extends Life
if (event.getType().equals(Lifecycle.AFTER_START_EVENT)) {
Object obj = event.getSource();
if (obj instanceof Wrapper) {
- registerWrapper((Wrapper) obj);
+ Wrapper w = (Wrapper) obj;
+ // Only if the Context has started. If it has not, then it will
+ // have its own "after_start" event later.
+ if (w.getParent().getState().isAvailable()) {
+ registerWrapper(w);
+ }
} else if (obj instanceof Context) {
- registerContext((Context) obj);
+ Context c = (Context) obj;
+ // Only if the Host has started. If it has not, then it will
+ // have its own "after_start" event later.
+ if (c.getParent().getState().isAvailable()) {
+ registerContext(c);
+ }
} else if (obj instanceof Host) {
registerHost((Host) obj);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]