tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [OT?] control of session timed out with tomcat
Date Thu, 20 Oct 2011 15:22:17 GMT
Hassan Schroeder wrote:
> On Thu, Oct 20, 2011 at 7:52 AM, André Warnier <aw@ice-sa.com> wrote:
> 
>> 1) Tomcat (probably) doesn't spend its time all the time scanning stored
>> sessions to see if one has expired, and deleting it.
> 
> Actually, it does. That's what session listeners depend on.
> 
> So, for example, I can have a ShoppingCart with a method like
> 
> public void valueUnbound(HttpSessionBindingEvent httpsessionbindingevent)
> {
>      empty(); /* remove reserved status from items */
> }
> 
> If the session times out without the cart contents being purchased,
> the cart returns any items it contains to inventory. Very handy :-)
> 
You mean that if there are 500 sessions active, Tomcat spends its time checking all of 
them repeatedly on the off-chance that one has expired ?
Or is there a smarter algorithm implemented there ?


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


Mime
View raw message