[weld-issues] [JBoss JIRA] Closed: (WELD-461) WeldPhaseListener should only cleanup response once
Nicklas Karlsson (JIRA)
jira-events at lists.jboss.org
Sun Mar 14 19:07:37 EDT 2010
[ https://jira.jboss.org/jira/browse/WELD-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicklas Karlsson closed WELD-461.
---------------------------------
Resolution: Done
Closed by exiting early for all context destruction about to take place on a context with a null BeanStore
Would a more correct place for this fix be in the Conversation Manager
or in the PhaseListener (how is it shared, can you keep a boolean flag there)?
> 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
> Assignee: Nicklas Karlsson
> Priority: Minor
> Fix For: 1.0.2.CR1
>
>
> 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