Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3117

Current server state saving implementation prevents multi-window usage

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.6-SNAPSHOT
    • Fix Version/s: 2.0.6, 2.1.0
    • Component/s: General
    • Labels:
      None
    • Environment:
      myfaces core trunk

      Description

      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.

        Attachments

        1. MYFACES-3117-1.patch
          121 kB
          Leonardo Uribe
        2. MYFACES-3117.patch
          2 kB
          Martin Kočí

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                lu4242 Leonardo Uribe
                Reporter:
                markoc50 Martin Kočí
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: