tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: how to keep session alive on the server side
Date Tue, 23 Nov 2010 19:47:22 GMT
Aggarwal, Ajay wrote:
> I have a situation where client 

what kind of client ?

enters a long duration request

do you mean that the request takes a long time to send to the server, or that the server 
will take a long time to respond ?

and I
> need to keep the session alive for the client 

? or for the server ?

while this long duration
> request is going on.  Since this long duration request could be hours, I
> do not want to change the default HTTP session timeout value. I also do
> not want to put the burden on the client to keep his session alive in
> the background (by making dummy requests).
> 
>  
> 
> I want to be able to handle it inside tomcat, if possible. Is there a
> way to manipulate the lastAccessTime on the session object?
> 

What I mean with the above is : if the client is a browser, and he sends a short request,

and the server takes a long time to respond, then the browser will time out after a few 
minutes (4-5) and display an error page, thinking that the server is down.

On the other hand, if your concern is that the server may time out the client session, 
while it is still processing the client request, then it should not do that.
It should only start timing the client inactivity after it has responded to the request, no
?

See servlet Specification v 3.0, sections 7.5 & 7.6.

"The session invalidation will not take effect until all
servlets using that session have exited the service method."

My interpretation of this is that the session timeout only counts *between* requests, not

while a request is still being processed.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message