[weld-issues] [JBoss JIRA] Created: (WELD-461) WeldPhaseListener should only cleanup response once

Dan Allen (JIRA) jira-events at lists.jboss.org
Sat Mar 6 09:57:10 EST 2010


WeldPhaseListener should only cleanup response once
---------------------------------------------------

                 Key: WELD-461
                 URL: https://jira.jboss.org/jira/browse/WELD-461
             Project: Weld
          Issue Type: Bug
          Components: Web Tier integration (JSF, JSP, EL and Servlet) 
    Affects Versions: 1.0.1.Final
            Reporter: Dan Allen
            Priority: Minor


FacesContext#getResponseCompete() may be true on more than one invocation of WeldPhaseListener#afterPhase(). Since the phase listener does not check to see if the request has already been cleaned up, Weld fails on the second cleanup attempt.

How does this scenario happen? One case is when the application calls ExternalContext#dispatch() to forward to another view. When the dispatch happens, the current lifecycle is marked FacesContext#responseComplete(). Control turns over to the lifecycle of the dispatched request. When the response is complete in that request, the WeldPhaseListener#afterPhase() will be called with FacesContext#getResponseComplete() equal to true. Control returns to the original request lifecycle, WeldPhaseListener#afterPhase() will again be called with FacesContext#getResponseComplete() equal to true.

The WeldPhaseListener should check to see if cleanup has already occurred, skipping cleanup if it has.

Applications should not expect contexts to be active in the original request lifecycle after ExternalContext#dispatch() has been called.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list