• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to find wether a session is valid using Session ID.

 
I Arvind Jai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a requirement in my application to reset DB status of a UserID when the users session gets invalidated upon network disconnection. To do this, my idea is to store the Session ID of the users in DB and then periodically check the validity of session using Session ID and then update status in DB when the session is found invalid.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not the best solution, in my opinion.

Rather, you can have the user id stored in the session, and use a session listener to know when the session is about to be destoryed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic