Hi 'Christopher Schultz,

  I'm sorry for late reply, i was away from work.

   Yes, setting session timeout -1 didn't work.

    We are using TC 5.0.16.

     I will check with TC 5.5 as you suggested.


Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Muneendra,
> 
> 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
> requests.
> 
>> 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
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFulRs9CaO5/Lv0PARArVZAJ9RitLq0OzdiCbub7lDQmSxjTj8sgCfeoI7
> W93Gv8SyZt6pXFsS30DSG8w=
> =9pbs
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Session-timeout-during-method-execution-tf3121073.html#a8722867
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to