File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes difference in actual and specified timeout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "difference in actual and specified timeout" Watch "difference in actual and specified timeout" New topic
Author

difference in actual and specified timeout

ashok sashrith
Greenhorn

Joined: Jan 31, 2005
Posts: 12
Hi,

My application requires session timeout after 20 minutes and had an entry in the web.xml.

<session-config>
<session-timeout>20</session-timeout>
</session-config>

but the session timeout happens only sometimes after 25 minutes. can anyone explain why this much delay in session timeout?

Additional info.:
IBM Websphere Application Server 5.0
Windows 2000

Thanks,
Ashok
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

You cannot expect timeout to occur at exactly 20 minutes after the previous request because the JVM may be busy doing something else. Having said that 5 minutes delay is too much. Check whether the server is busy processing some other request which may result in the timeout thread not getting CPU cycles.


Groovy
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

We found the same thing in Websphere. The timeout value prevents the user from using the session, but the actual session does not get cleared for some time after. This is just the way it is, unfortunately
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Originally posted by David O'Meara:
We found the same thing in Websphere. The timeout value prevents the user from using the session, but the actual session does not get cleared for some time after. This is just the way it is, unfortunately


If it prevents the user from using it after 20 minutes (and not 25 minutes)then it should be ok even if the other listener methods are invoked later.
ashok sashrith
Greenhorn

Joined: Jan 31, 2005
Posts: 12
David, There is confusion over here. Could you little more elaborate on "The timeout value prevents the user from using the session, but the actual session does not get cleared for some time after".

Thanks,
Ashok
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference in actual and specified timeout