Author: violetagg
Date: Wed Jun 24 13:40:34 2015
New Revision: 1687268
URL: http://svn.apache.org/r1687268
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57700
ADD_CHILD_EVENT must be sent even when there are failures during child's start,
thus MapperListener will be added as Container/Lifecycle Listener and will be
able to receive events related to the corresponding Container.
Modified:
tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1687268&r1=1687267&r2=1687268&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Wed Jun 24
13:40:34 2015
@@ -717,19 +717,18 @@ public abstract class ContainerBase exte
// Start child
// Don't do this inside sync block - start can be a slow process and
// locking the children object can cause problems elsewhere
- if ((getState().isAvailable() ||
- LifecycleState.STARTING_PREP.equals(getState())) &&
- startChildren) {
- try {
+ try {
+ if ((getState().isAvailable() ||
+ LifecycleState.STARTING_PREP.equals(getState())) &&
+ startChildren) {
child.start();
- } catch (LifecycleException e) {
- log.error("ContainerBase.addChild: start: ", e);
- throw new IllegalStateException
- ("ContainerBase.addChild: start: " + e);
}
+ } catch (LifecycleException e) {
+ log.error("ContainerBase.addChild: start: ", e);
+ throw new IllegalStateException("ContainerBase.addChild: start: "
+ e);
+ } finally {
+ fireContainerEvent(ADD_CHILD_EVENT, child);
}
-
- fireContainerEvent(ADD_CHILD_EVENT, child);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]