You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Robert M. Gary (JIRA)" <de...@myfaces.apache.org> on 2011/05/04 22:12:03 UTC

[jira] [Commented] (MYFACES-3117) Current server state saving implementation prevents multi-window usage

    [ https://issues.apache.org/jira/browse/MYFACES-3117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028928#comment-13028928 ] 

Robert M. Gary commented on MYFACES-3117:
-----------------------------------------

Sorry for a dumb question; but what is the "double submit" problem. Does it refer to a connection retry in which the server actually receives both requests? I'm seeing the defect mentioned here. I use RichFaces for Ajax and use a4j:poll. The polling window quickly uses up the default 20 saved views on the server and then any other open windows immediately get View Expired. Unfortunately some of my view data is large so I"m avoiding using client side.

> Current server state saving implementation prevents multi-window usage
> ----------------------------------------------------------------------
>
>                 Key: MYFACES-3117
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3117
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.6-SNAPSHOT
>         Environment: myfaces core trunk
>            Reporter: Martin Kočí
>            Priority: Critical
>         Attachments: MYFACES-3117.patch
>
>
> Problem:
> open two tabs (or windows) in browser with view:
> <h:body>
>         <h:form id="formId">
>             <h:commandButton value="Click me 20x!" />
>         </h:form>
>  </h:body>
> then click the button on the first tab 20x or more -> then click the button on the second tab -> you will get the most beloved ViewExpiredException.
> Reason:
> oam.SerializedViewCollection drops the saved state for 2. tab from map. 
> Suggestion:
> remove the successfully restored view state from map. This can be done, because each SerializedViewKey is unique over *all requests* for one HttpSession -  see DefaultFaceletsStateManagementHelper.nextViewSequence(FacesContext). Because each request has unique sequence number, we can the "just restored" one remove from the map, because it can never come from  client again.
> Open question: the previous statement is true except the double submit problem: 	JAVASERVERFACES_SPEC_PUBLIC-559. In this case, server can process same request (with the same sequence number) twice.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira