tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric B." <>
Subject Re: HttpSession.setMaxInactiveInterval() sets for all sessions?
Date Sat, 03 Oct 2009 22:56:17 GMT
"Eric B." <> wrote in message 
>> "Hassan Schroeder" <> wrote in message 
>> On Thu, Oct 1, 2009 at 6:38 PM, Eric B. <> wrote:
>> > I'm running Tomcat 6.0.18 and seeing something very bizarre. If I use
>> > HttpSession.setMaxInactiveInterval() in one session, and then in a 
>> > different
>> > session, use HttpSession.getMaxInactiveInterval(), I get the value that 
>> > I
>> > just set in the first session.
>> > Am I seeing strange behaviour, or is this behaviour by design?
>> I don't see that behavior in a quick test with
>> Tomcat 6.0.20, context running Servlet Spec 2.5 on
>> (Mac) Java(TM) SE Runtime Environment (build 1.6.0_15-b03-226)
>> Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-92, mixed mode
>> Do you have a test case? Are you really sure you're getting those
>> data points from different sessions?
> No, I don't have a test case for that at all.  One of my developpers made 
> modifications to our application in order to set the max inactive 
> interval. I looked at his code changes, and they all _seem_ correct, so 
> was very surprised to see that kind of behaviour.  I ran some tests myself 
> within our application and confirmed the behaviour he saw so was even more 
> surprised.

Ok - so I built a few different test cases to reproduce what my developpers 
had done, and I couldn't reproduce the issue.  So I took a closer look at 
his code, and indeed, he was doing something incorrect and was resetting the 
inactive interval for all sessions accidentally.

Thanks for the response.  Helped me track down a bug that we would otherwise 
have missed.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message