Hi, I have a web application that uses HttpSessionListener's methods for session creation and destruction notifications. When I request my web application I receive sessionCreated, when I invalidate the session from the code I receive sessionDestroyed. Unfortunately when I stop the web application I do not receive sessionDestroyed. I checked the code where StandardContext is stopped. I can see that StandardManager.stop is called which is ok But when StandardManager.doUnload() is invoked, in its implementation * session.expire(false)* is called where the "false" is actually the flag that indicates whether to notify the listeners or not. As it is invoked with "false" - the listeners are not invoked.
I made a patch in StandardManager, when apply it to my system, sessionDestroyed is called. Could you check my proposal and tell whether my assumptions. Thanks in advance Best Regards Violeta Georgieva Environment details: Tomcat 6.0.33, Window 7 Patch ==================== Index: StandardManager.java =================================================================== --- StandardManager.java (revision 1181173) +++ StandardManager.java (working copy) @@ -565,7 +565,7 @@ while (expires.hasNext()) { StandardSession session = (StandardSession) expires.next(); try { - session.expire(false); + session.expire(); } catch (Throwable t) { ; } finally {