RE: Detecting Sessions already existent at Tomcat Startup?

2004-04-19 Thread Mark Thomas
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Schildbach > Aside from that, wouldn't it be nice of the servlet spec would allow > binding HttpSessionActivationListeners to the whole > application instead > just to an attribute? In my application, it would be much > elegant/easier. M

Re: Detecting Sessions already existent at Tomcat Startup?

2004-04-19 Thread Andreas Schildbach
Hello again, I solved the inner class issue. Had to declare the inner class as static. Regards, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Detecting Sessions already existent at Tomcat Startup?

2004-04-19 Thread Andreas Schildbach
Hello Mark, you are right, sorry for misinterpreting the spec. What I am now doing is, for each session I set an instance of a custom HttpSessionActivationListener implementation as an attribute. This works, at least if the Listener is implemented as a normal (outer) class. If I implement it a

RE: Detecting Sessions already existent at Tomcat Startup?

2004-04-18 Thread Mark Thomas
Andreas, I believe you have misinterpreted the spec. Having re-read the relevant parts of the spec (SRV.10.2, SRV.15.1.7 & SRV.15.1.8) HttpSessionActivationListener applies to session attributes. Although HttpSessionActivationListener's inclusion in table SRV.10-1 could suggest otherwise, section

Re: Detecting Sessions already existent at Tomcat Startup?

2004-04-18 Thread Andreas Schildbach
Mark Thomas wrote: Without looking at your source code, no idea. I have just checked the Tomcat source and every attribute that implements HttpSessionActivationListener will have sessionWillPassivate() and sessionDidActivate() called. I've got a simple class that keeps track of the sessions that

RE: Detecting Sessions already existent at Tomcat Startup?

2004-04-18 Thread Mark Thomas
nal Message- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Schildbach > Sent: Sunday, April 18, 2004 7:28 PM > To: [EMAIL PROTECTED] > Subject: Re: Detecting Sessions already existent at Tomcat Startup? > > Hello Mark, > > > > > SRV.

Re: Detecting Sessions already existent at Tomcat Startup?

2004-04-18 Thread Andreas Schildbach
Hello Mark, SRV.15.1.8 HttpSessionActivationListener HttpSessionActivationListener is the way to achieve what you are trying to do. Then why doesn't Tomcat 5.0.19 call my registered HttpSessionActivationListener when I shut Tomcat down or start it up again? I know that my sessions are being pe

RE: Detecting Sessions already existent at Tomcat Startup?

2004-04-18 Thread Mark Thomas
SRV.15.1.8 HttpSessionActivationListener public interface HttpSessionActivationListener extends java.util.EventListener All Superinterfaces: java.util.EventListener Objects that are bound to a session may listen to container events notifying them that sessions will be passivated and that session