[ 
https://issues.apache.org/jira/browse/ORCHESTRA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627479#action_12627479
 ] 

Jim commented on ORCHESTRA-29:
------------------------------

Petr is correct, NetAdvantage uses PhaseListener.beforePhase (for Render 
Response phase) to handle AJAX requests. The NetAdvantage team regards this as 
the safest -  and fastest - way to AJAX.

Going forward, we are watching the JSF 2 spec to see how AJAX will be 
standardized. 

> Make access-scope work with ajax frameworks that "render" during beforePhase 
> of a PhaseListener
> -----------------------------------------------------------------------------------------------
>
>                 Key: ORCHESTRA-29
>                 URL: https://issues.apache.org/jira/browse/ORCHESTRA-29
>             Project: MyFaces Orchestra
>          Issue Type: Improvement
>          Components: Conversation
>            Reporter: Simon Kitching
>
> As reported by Petr Juza, there is a problem with the NetAdvantage ajax 
> library and orchestra access-scoped conversations.
> Orchestra's AccessScopePhaseListener runs for the RENDER_RESPONSE phase. In 
> beforePhase it clears the "accessed" flag of all conversations, and then in 
> afterPhase it discards conversations that are not accessed. In other words, 
> it expects rendering to occur between its beforePhase and afterPhase are run.
> However in the NetAdvantage ajax framework (and possibly others) it appears 
> that the ajax equivalent of "rendering" is done by a PhaseListener's 
> beforePhase code, and that the PhaseListener then calls 
> facesContext.responseComplete to block normal rendering. In other words, 
> these ajax frameworks effectively move "rendering" (including access to all 
> the beans) earlier in time than normal JSF processing.
> In this situation, *if* the Orchestra PhaseListener is registered first, then 
> all works fine. But if it gets registered after the ajax phase listener, then 
> the accesses to conversation-scoped beans all occur before its beforePhase 
> (where the access flags are cleared). So at afterPhase no conversations 
> appear to be accessed.
> I don't think this qualifies as an Orchestra *bug*; moving rendering out of 
> its normal time is the problem.
> However the obvious solution is for Orchestra to somehow clear access flags 
> at the very start of the render phase, before any PhaseListener objects are 
> run.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to