Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3528

HttpSession isNew() inaccurate if the 2nd request for the session is on different server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • JBossAS-4.0.5.CR1
    • JBossAS-3.2.6 Final, JBossAS-3.2.7 Final, JBossAS-4.0.1 SP1, JBossAS-4.0.2 Final, JBossAS-4.0.3 Final, JBossAS-4.0.3 SP1, JBossAS-3.2.8 Final, JBossAS-3.2.8.SP1, JBossAS-4.0.4.GA
    • None
    • Low

      Tomcat sets a session's isNew field to false as part of Request.recyle() processing, which occurs after the session has replicated. The effect of this is the replicated session has the wrong value. If the second request for the session goes to another node, a call to isNew() will be inaccurate.

      If there was more than one request on the 1st node, there is no problem. Any subsequent request on the 2nd node will also return the correct value.

      Simple fix is to set isNew to false whenever a session is deserialized. For 5.0 we can just skip serializing this field and set it to false in readObject; for binary compatibility must serialize it in 4.0.x.

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: