Session timeout issue with setMaxInactiveInterval() and already-active sessions
-------------------------------------------------------------------------------

                 Key: CDV-634
                 URL: https://jira.terracotta.org/jira//browse/CDV-634
             Project: Community Development
          Issue Type: Bug
          Components: X-Sessions
    Affects Versions: 2.5.2
         Environment: CentOS 5.1, fully patched, JDK 1.6.0_04.  Tomcat  6.0.16, 
apache 2.2.8, connected via mod_jk version 1.2.26
            Reporter: Stu Belden
            Assignee: Issue Review Board


Programatically setting the session timeout value to a value shorter than the 
idle time since the _last_ request throws an IllegalStateException.

How to reproduce this issue consistently:
* Make a request to the server.  Set the session timeout on the new session to 
60 minutes.
* Sit idle for 31 minutes.
* Make another request to the server.  In the request, set the session timeout 
to 30 minutes via setMaxInactiveInterval()
* In that same request, try and access the session (e.g. call 
session.getAttribute(), or any other method that calls isValid())
* Terracotta throws a "java.lang.IllegalStateException: This session is 
invalid" exception.

I think this is a bug, as the above scenario works fine on vanilla Tomcat 6 and 
WebSphere 6.1.  If I attach a debugger to Tomcat, I can see that the idle time 
in the SessionData obj is indeed greater than the max allowed idle time.

I know tomcat 6 isn't officially supported, but I'm hoping you guys have an 
install of 5.5 or something where you can verify this. ;)

One workaround is to invalidate the session before setting the timeout lower, 
but that is really not desirable in many cases.  The other workaround obviously 
being "don't do this."



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to