tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Session timeout during method execution
Date Fri, 26 Jan 2007 19:20:13 GMT
Hash: SHA1


Muneendra wrote:
> Lets says, my Web Application session timeout period is 5 minutes.
> I made a Http request to server and corresponding Servlet requires more than
> 5 minutes lets say 10 minutes to complete the business logic.

Your browser is unlikely to wait for that long for a response.

> As we can see in the above case, Session is invalidated before end of
> business logic execution in Servlet.

What version of TC are you using? I believe that the 5.5 versions
actually have a flag that prevents sessions from timing out during long

> I've tried following code to work around the problem but seems to be no luck
> Before executing the business logic in a method
> int timeoutBackup = session.getMaxInactiveInterval(); (5 minutes)
> session.setMaxInactiveInterval(-1);
> Business Logic.... (10 minutes)
> session.setMaxInactiveInterval( timeoutBackup ); ( 5 minutes )
> return;

Hmm... it's odd that this technique does not work. I would have expected
it to work. Have you checked to see that you are actually setting this
value? It's possible that TC doesn't allow you to modify this value,
although I would be surprised if that were the case.

- -chris
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message