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

Nicklas Karlsson (JIRA) jira-events at lists.jboss.org
Sat Mar 6 17:18:10 EST 2010


    [ https://jira.jboss.org/jira/browse/WELD-461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12518520#action_12518520 ] 

Nicklas Karlsson commented on WELD-461:
---------------------------------------

What is the stack trace on failure? Is it from the conversation context being destroyed twice and the BeanStore being null? One option would be to move the destruction flag into the conversation manager and have it reset when the conversation is set up.

> 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