You added a listener element to your web.xml registering TestTomcatNotifications as a HttpSessionListener?
On shutdown sessionDestroyed(...) doesn't get called because the StandardManager persists sessions and doesn't destroy them.
Let us know if you still don't get the sessionWillPassivate(...) event coz that would worry me.
Jon
Maksimenko Alexander wrote:
Hi! I created the following implementation of HttpSessionListener,HttpSessionActivationListener.
public class TestTomcatNotifications implements HttpSessionListener, HttpSessionActivationListener { public void sessionCreated(HttpSessionEvent se) { System.out.println("TestTomcatNotifications.sessionCreated(se)"); } public void sessionDestroyed(HttpSessionEvent se) { System.out.println("TestTomcatNotifications.sessionDestroyed(se)"); } public void sessionWillPassivate(HttpSessionEvent se) { System.out.println("TestTomcatNotifications.sessionWillPassivate(se)"); } public void sessionDidActivate(HttpSessionEvent se) { System.out.println("TestTomcatNotifications.sessionDidActivate(se)"); } }
So this class logs that some method was invoked only. But when I am shut down tomcat neither sessionWillPassivate nor sessionDestroyed are been invoked. In API Doc we can read that: "A container that migrates session between VMs or persists sessions is required to notify all attributes bound to sessions implementing HttpSessionActivationListener". What's wrong?
P.S. I use org.apache.catalina.session.StandardManager implementation.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
