• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get intimated and catch user sessions when tomcat goes down using struts

 
san jan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Santosh,
Your display name does not comply with our naming policy so I'll have to ask you to change it.
Thanks.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, but "santu j" is still not a valid display name. Initials are only valid for first names, not last names. It's a picky rule, but it's one that we enforce strongly.
Dave
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
san jan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This thread is a duplicate and will be closed.
People wanting to help should see the this thread.
Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic