This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
How to get intimated and catch user sessions when tomcat goes down using struts?How to invalidate sessions when Tomcat goes down? Am using struts. Am using sockets in our application. And session ids are getting saved across tomcat restarts. So sockets are not getting cleaned properly when the server goes down since the session is not getting expired/invalidated. Thanks, Santosh
I'm not sure I understand the question (I fail to see where sockets come into the picture), but you should be able to provide a solution using tokens. I haven't done enough Struts work, but doesn't it have built-in support for tokens to prevent users submitting the same form twice? Although the sesison ID remains the same, the session data is lost between restarts and therefore the token check would fail. Just an idea. Dave
Joined: Sep 26, 2000
Probably the way I questioned was wrong. I am using sockets and they are cleaned up by a method that gets called when a session is found to be invalid. But with tomcat even after restart the session is not becoming invalid (as cookies are used and the server was started before session timeout), but the socket is dangling since the application was closed and restarted. So I wanted to get intimated before the server goes down so that I can clean the sockets.