Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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

 
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!!!
 
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.
 
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!
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic