RE: Counting active sessions if server restarts very often

2003-09-04 Thread Shapira, Yoav
Tomcat Users List' >Subject: RE: Counting active sessions if server restarts very often > >The sessionWillActivate() method is called every time a session activates. >If your sessions are persistent, then each one will be re-activated when >the >server restarts, so this method

RE: Counting active sessions if server restarts very often

2003-09-04 Thread Bodycombe, Andrew
s, Andy -Original Message- From: Christian Hauser [mailto:[EMAIL PROTECTED] Sent: 04 September 2003 10:51 To: Tomcat Users List Subject: Re: Counting active sessions if server restarts very often Thank you, Andrew, for your fast reply. I hope this works, but I still don't undestand w

Re: Counting active sessions if server restarts very often

2003-09-04 Thread Christian Hauser
ement the count. This should eliminate the need to store anything in the session. Hope this helps Andy -Original Message- From: Christian Hauser [mailto:[EMAIL PROTECTED] Sent: 04 September 2003 10:01 To: Tomcat Users List Subject: Re: Counting active sessions if server restarts very

RE: Counting active sessions if server restarts very often

2003-09-04 Thread Bodycombe, Andrew
September 2003 10:01 To: Tomcat Users List Subject: Re: Counting active sessions if server restarts very often Shapira, Yoav wrote: > Howdy, > > >>Is there an other way to implement this? Maybe by saving the variable >>activeSessions to a session (which is restored when the s

Re: Counting active sessions if server restarts very often

2003-09-04 Thread Christian Hauser
Shapira, Yoav wrote: Howdy, Is there an other way to implement this? Maybe by saving the variable activeSessions to a session (which is restored when the server has restarted)? This is not a bad idea, and might be the easiest way. A DB write on shutdown/read on startup is also an option. To r

Re: Counting active sessions if server restarts very often

2003-09-03 Thread Jon Wingfield
When the session is created add an attribute that implements HttpSessionActivationListener. When the server stops the sessionWillPassivate method will be called. When the server restarts the sessionDidActivate method will be called. Use those methods in conjunction with your HttpSessionListene

RE: Counting active sessions if server restarts very often

2003-09-03 Thread Shapira, Yoav
Howdy, >Is there an other way to implement this? Maybe by saving the variable >activeSessions to a session (which is restored when the server has >restarted)? This is not a bad idea, and might be the easiest way. A DB write on shutdown/read on startup is also an option. Yoav Shapira This e-

Counting active sessions if server restarts very often

2003-09-03 Thread Christian Hauser
Hello list I implemented a session counter to count all active sessions. Now I have the problem that because the server is being restarted very often, my static variable activeSessions is always set to 0. Is there an other way to implement this? Maybe by saving the variable activeSessions to a