You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2016/05/10 06:02:59 UTC

[Bug 59449] New: org.apache.catalina.core.ContainerBase#removeChild remove order

https://bz.apache.org/bugzilla/show_bug.cgi?id=59449

            Bug ID: 59449
           Summary: org.apache.catalina.core.ContainerBase#removeChild
                    remove order
           Product: Tomcat 9
           Version: 9.0.0.M4
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: huxing.zhang@gmail.com

Created attachment 33832
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33832&action=edit
patch to implement the proposed behaviour.

Hi, 

In org.apache.catalina.core.ContainerBase#addChildInternal,  we have the
following execution order:

1. put child to children
2. call child' start
3. fire ADD_CHILD_EVENT

However, in org.apache.catalina.core.ContainerBase#removeChild, the execution
order is not in reverse order:

1. remove child from children
2. call child's stop
3. fire REMOVE_CHILD_EVENT
4. call child's destroy if necessary 

This may lead to some unexpected behaviour. e.g. One can deploy a web app while
it is being undeployed.

Proposed execution order  in removeChild:

1. call child's stop
2. call child's destroy if necessary 
3. remove child from children
4. fire REMOVE_CHILD_EVENT

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 59449] org.apache.catalina.core.ContainerBase#removeChild remove order

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59449

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the report and the patch.

This has been fixed in the following versions:
- 9.0.x for 9.0.0.M5
- 8.5.x for 8.5.1
- 8.0.x for 8.0.34
- 7.0.x for 7.0.70
- 6.0.x for 6.0.46

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 59449] org.apache.catalina.core.ContainerBase#removeChild remove order

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59449

--- Comment #2 from ralphcorrales <ra...@outlook.com> ---
Read https://theessayservice.org/buy-book-review/ for issues on standard
implementation of ServletContext that represents a web application's execution
environment descriptions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org