tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 50107] New: StandardPipeline is destroyed two times.
Date Mon, 18 Oct 2010 07:05:48 GMT

           Summary: StandardPipeline is destroyed two times.
           Product: Tomcat 7
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina

Created an attachment (id=26181)
 --> (
patch for

When I call MBeanFactory#removeHost operation via JMX(jconsle), I get the
following message.

INFO: The destroy() method was called on component
[Pipeline[StandardHost[localhost]]] after destroy() had already been called.
The second call will be ignored.

StandardPipeline is destroyed two times.
At first, pipeline is destroyed at L.1096:
<< destroyInternal() L.1094-1097>>
   1094         // Stop the Valves in our pipeline (including the basic), if
   1095         if (pipeline instanceof Lifecycle) {
   1096             ((Lifecycle) pipeline).destroy();
   1097         }

<< destroyInternal() L.1104-1107>>
   1104         // Required if the child is destroyed directly.
   1105         if (parent != null) {
   1106             parent.removeChild(this);
   1107         }
When above-mentioned "parent" is StandardEngine, the parent.removeChild() calls
the  LifecycleBase#child.destroy(), and child.destroy() calls
At this time ContainerBase is StandardHost.
<< removeChild() L.960-964>>
    960         // Set child's parent to null to prevent a loop
    961         child.setParent(null);
    962         try {
    963             child.destroy();
    964         } catch (LifecycleException e) {

As a result, pipeline is destroyed again(, and get the above-mentioned info

In Tomcat 6.0, child.destroy() is not called from ContainerBase#removeChild().
But, as seen above, the removeChild() that is contained in Tomcat7.0 calls the
IMHO, it might not be better to call the child.destroy() from removeHost().

I made the patch that removed host.destroy() from removeHost(). 

Best regards.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message