Re: [OT?] control of session timed out with tomcat

2011-10-21 Thread André Warnier
Mark Thomas wrote: ... Of course in all this, my basic assumption is that currently, Tomcat keeps session information (including the expiration data) in some location which requires an I/O action to access. That assumption is incorrect. Which pretty much invalidates the rest of the points be

Re: [OT] control of session timed out with tomcat

2011-10-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim, On 10/21/2011 2:10 PM, Tim Watts wrote: > On Fri, 2011-10-21 at 11:05 -0400, Christopher Schultz wrote: On > 10/20/2011 7:01 PM, Tim Watts wrote: This was a while ago -- no HttpSessionListeners available -- so we couldn't easily persist

Re: [OT] control of session timed out with tomcat

2011-10-21 Thread Tim Watts
On Fri, 2011-10-21 at 11:05 -0400, Christopher Schultz wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Tim, > > On 10/20/2011 7:01 PM, Tim Watts wrote: > > This was a while ago -- no HttpSessionListeners available -- so we > > couldn't easily persist the session and recall it when th

Re: [OT] control of session timed out with tomcat

2011-10-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim, On 10/20/2011 7:01 PM, Tim Watts wrote: > This was a while ago -- no HttpSessionListeners available -- so we > couldn't easily persist the session and recall it when the user > logged in again. Wow. What were you using, Apache JServ? Tomcat 3.x?

Re: [OT?] control of session timed out with tomcat

2011-10-21 Thread Mark Thomas
On 21/10/2011 13:43, André Warnier wrote: > Mark Thomas wrote: > >> On 21/10/2011 11:42, André Warnier wrote: >>> Allright, so how about a half-way house to start with ? >>> Keep the list in some thread-safe table, indexed by session-id, and just >>> scan the table. >>> Updating the corresponding

Re: [OT?] control of session timed out with tomcat

2011-10-21 Thread André Warnier
Mark Thomas wrote: On 21/10/2011 11:42, André Warnier wrote: Allright, so how about a half-way house to start with ? Keep the list in some thread-safe table, indexed by session-id, and just scan the table. Updating the corresponding session entry at each request should be cheap. Of course in a

Re: [OT?] control of session timed out with tomcat

2011-10-21 Thread Mark Thomas
On 21/10/2011 11:42, André Warnier wrote: > Allright, so how about a half-way house to start with ? > Keep the list in some thread-safe table, indexed by session-id, and just > scan the table. > Updating the corresponding session entry at each request should be cheap. > > Of course in all this, my

Re: [OT?] control of session timed out with tomcat

2011-10-21 Thread André Warnier
Mark Thomas wrote: On 21/10/2011 10:05, André Warnier wrote: I am assuming that at each access to the application, Tomcat updates the expiration time of the session if any (that is, it sets a new date/time at which this session will be considered as expired, being "now" + timeout). Rather than

Re: [OT?] control of session timed out with tomcat

2011-10-21 Thread Mark Thomas
On 21/10/2011 10:05, André Warnier wrote: > I am assuming that at each access to the application, Tomcat updates the > expiration time of the session if any (that is, it sets a new date/time > at which this session will be considered as expired, being "now" + > timeout). Rather than making incorre

Re: [OT?] control of session timed out with tomcat

2011-10-21 Thread André Warnier
Mark Thomas wrote: On 20/10/2011 17:01, Tim Watts wrote: On Thu, 2011-10-20 at 16:35 +0100, Mark Thomas wrote: On 20/10/2011 16:22, André Warnier wrote: Hassan Schroeder wrote: On Thu, Oct 20, 2011 at 7:52 AM, André Warnier wrote: 1) Tomcat (probably) doesn't spend its time all the time sc

Re: [OT?] control of session timed out with tomcat

2011-10-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark, On 10/20/2011 11:35 AM, Mark Thomas wrote: > On 20/10/2011 16:22, André Warnier wrote: >> Or is there a smarter algorithm implemented there ? > > Such as? I'm open to ideas here (maybe not for this exact problem > but certainly the general one)

Re: [OT?] control of session timed out with tomcat

2011-10-20 Thread Mark Thomas
On 20/10/2011 17:01, Tim Watts wrote: > On Thu, 2011-10-20 at 16:35 +0100, Mark Thomas wrote: >> On 20/10/2011 16:22, André Warnier wrote: >>> Hassan Schroeder wrote: On Thu, Oct 20, 2011 at 7:52 AM, André Warnier wrote: > 1) Tomcat (probably) doesn't spend its time all the time scan

Re: [OT?] control of session timed out with tomcat

2011-10-20 Thread Tim Watts
On Thu, 2011-10-20 at 16:35 +0100, Mark Thomas wrote: > On 20/10/2011 16:22, André Warnier wrote: > > Hassan Schroeder wrote: > >> On Thu, Oct 20, 2011 at 7:52 AM, André Warnier wrote: > >> > >>> 1) Tomcat (probably) doesn't spend its time all the time scanning stored > >>> sessions to see if one

Re: [OT?] control of session timed out with tomcat

2011-10-20 Thread Mark Thomas
On 20/10/2011 16:22, André Warnier wrote: > Hassan Schroeder wrote: >> On Thu, Oct 20, 2011 at 7:52 AM, André Warnier 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

Re: [OT?] control of session timed out with tomcat

2011-10-20 Thread André Warnier
Hassan Schroeder wrote: On Thu, Oct 20, 2011 at 7:52 AM, André Warnier 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