Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling the event (if exists) when the Struts instance stops or restarts

 
Matias Emanuel Serrano
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm having some troubles with my applicatin when a user is logged in and the instance is restarted. Obviously, the session don't survives the restart... but is there some way to send a message to the client (and maybe log out the client) when it's detect a server restart??

Thank you!!!
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not able to understand your problem can you please elaborate it more.
 
Rajkumar Katudia
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matias Emanuel Serrano wrote:Hi, I'm having some troubles with my applicatin when a user is logged in and the instance is restarted. Obviously, the session don't survives the restart... but is there some way to send a message to the client (and maybe log out the client) when it's detect a server restart??

Thank you!!!



Never tried but I guess this might solve your problem

http://en.wikipedia.org/wiki/Push_technology


Please let us know what did you do finally to resolve this
 
Matias Emanuel Serrano
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem it's very simple:
1- I have an Instance of my application running in the server.
2- Users can login and logout normally
3- I decide for some cause to restart my server (but there are some clients who are still registered when i do this)
4- When the application restarts, the clients that were logged in before the restart, wants to do something in the application.
5- In this point, my application throws a null pointer execption when i want to get some data from the session, because i haven't got a session due the server restarts.

What i want to do, is to handle the event (if exists) when the server is stopping, and close the sessions of the clients that are logged. With this, when the instance is running again, there are not clients logged in, and the problem is solved.
 
Matias Emanuel Serrano
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajkumar Katudia wrote:
Matias Emanuel Serrano wrote:Hi, I'm having some troubles with my applicatin when a user is logged in and the instance is restarted. Obviously, the session don't survives the restart... but is there some way to send a message to the client (and maybe log out the client) when it's detect a server restart??

Thank you!!!



Never tried but I guess this might solve your problem

http://en.wikipedia.org/wiki/Push_technology


Please let us know what did you do finally to resolve this


I will try it... thank you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic