Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session expair

 
seetharama sarma
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I am not calling any invalidate function in my code. I need to know when exactly a session will be closed or expaired. Is it that If the client closes his browser , the session will be expaired ?
I need this very urgently.
 
Ravi Kumar Ravuru
Ranch Hand
Posts: 176
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello SeethaRam,
The invalidate method will be called when the user clicks on the logout button(when u write this method in a jsp or servlet and this page is linked to Logout button).Hope this answer satisfies ur question.
Ravi
 
prabhat kumar
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
session expires only when when :
1. you specifically invalidate it
2. when there is a server timeout occurs.
in first condition you have complete control and you can do the cleanup(like closing databse connection)
in second condition you do not have any control because http is an stateless protocol.
so you can know abt the session timeout only
when you implement "HttpSessionBindingListener"
and override the Valueunbound method in it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic