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 2015/01/15 13:11:30 UTC

[Bug 57446] New: Catalina presents a wrapped ServletContext in de-init phase to application listeners

https://issues.apache.org/bugzilla/show_bug.cgi?id=57446

            Bug ID: 57446
           Summary: Catalina presents a wrapped ServletContext in de-init
                    phase to application listeners
           Product: Tomcat 8
           Version: 8.0.9
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: bzi@denkformat.de

JSF Applications (Mojarra 2.2.x) fail to shutdown properly, because Catalina
presents a wrapped ServletContext (NoPluggabilityServletContext) in de-init
phase (e.g. stop webapp cmd issued via jmx). The problem here is that the
wrapped ServletContext (NoPluggabilityServletContext) does not appear to be
"equal" (equals, etc. methods not delegated) as the one in the init phase
(start). I filed a bug on the mojarra JIRA:
https://java.net/jira/browse/JAVASERVERFACES-3687 but it was not accepted,
because they argue this is a container issue. Maybe a workaround could fix it
for context "comparing" webapps. In this case the mojarra implementation uses a
List (CopyOnWriteArrayList) to match (contains) if the ServletContext has been
initialized. So a delegation of the "equals" method in the
NoPluggabilityServletContext class could do the fix, but might cause other
sideeffects in the container, which i didn't lookout. A more detailed approach
would be to get a light on the specification - what doues it say about the
ServletContext instance and presented proxies in the application lifecycle.

-- 
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 57446] Catalina presents a wrapped ServletContext in de-init phase to application listeners

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

Birger Zimmermann <bz...@denkformat.de> changed:

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

--- Comment #3 from Birger Zimmermann <bz...@denkformat.de> ---
Just checked the issue with the latest trunk. Seems like it is still not fixed.
Now the org.apache.catalina.core.StandardContext$NoPluggabilityServletContext
is presented in the init phase. And a
org.apache.catalina.core.ApplicationContextFacade in the de-init. How i
understand the issue; it is a must to present the same context instance in init
and de-init phase?

-- 
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 57446] Catalina presents a wrapped ServletContext in de-init phase to application listeners

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

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

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

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
This has been fixed in trunk, 8.0.x (for 8.0.18 onwards) and 7.0.x (for 7.0.58
onwards).

-- 
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 57446] Catalina presents a wrapped ServletContext in de-init phase to application listeners

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

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

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

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
Check again. This has been fixed and includes a test case to confirm the
correct behaviour. Please do not reopen this issue unless you can provide a
patch to the existing test case that demonstrates a problem.

-- 
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 57446] Catalina presents a wrapped ServletContext in de-init phase to application listeners

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Seeing the same ServletConext for contextInitialized() and contextDestroyed()
seems like a reasonable expectation to me. I'd agree that this is something
that the Tomcat folks need to take a look at. It is on my list for the coming
week.

-- 
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