ICEfaces
  1. ICEfaces
  2. ICE-4496

isExpired method throws Exception if session isExpired

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEFaces + Tomcat

      Description

      A test checking for the positive session timeout value stored in the session throws an exception if the session is already expired. Catch this exception and return true instead.

        Activity

        Greg Dick created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18891 Tue May 19 09:05:03 MDT 2009 greg.dick ICE-4496 Return true from isExpired on exception reading session
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 1.8.1 [ 10170 ]
        Assignee Greg Dick [ greg.dick ]
        Hide
        Greg Dick added a comment -

        In the original failover testing, I found the maxInactiveInterval method on the HttpSession object on the new primary node returned -1. This caused the SessionDispatcher logic to immediately fail the session. A value of -1 is potentially valid, and stands for 'never timeout'. So the code testing session validity now checks if the value of this maxInactiveInterval is positive, and if so, puts this positive value into the session (only once) as a mechanism for sharing this info with the failover node. On the new primary node, there's apparently no way to discover what the original value was in web.xml.

        This bit would throw an exception checking if the session was expired if the session had expired. The code now catches this exception.

        Show
        Greg Dick added a comment - In the original failover testing, I found the maxInactiveInterval method on the HttpSession object on the new primary node returned -1. This caused the SessionDispatcher logic to immediately fail the session. A value of -1 is potentially valid, and stands for 'never timeout'. So the code testing session validity now checks if the value of this maxInactiveInterval is positive, and if so, puts this positive value into the session (only once) as a mechanism for sharing this info with the failover node. On the new primary node, there's apparently no way to discover what the original value was in web.xml. This bit would throw an exception checking if the session was expired if the session had expired. The code now catches this exception.
        Greg Dick made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18903 Wed May 20 10:10:58 MDT 2009 greg.dick ICE-4496 getMaxInactiveInterval also throws IllegalStateException with an expired session.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Greg Dick
            Reporter:
            Greg Dick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: