• Post Reply Bookmark Topic Watch Topic
  • New Topic

Explicit v/s Implicit Session Invalidation  RSS feed

 
Sam Furtado
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys !!!
To track session invalidation i've made use of the HttpSessionListener which keeps track of session's created & destroyed. However, how should it be determined whether the session that was invalidated was dua to an explicit invalidate() or an implicit Session Timeout.
Pls Suggest what needs to be done.
Thanks
 
Ken Robinson
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not know if there is an explicit method to determine how the Session's invalidation came about.
One thing you can do yourself is, prior to calling invalidate(), place an object to indicate this in the Session (say a String with the key 'Invalidate'). In the correct method of the SessionListener, look for this object. If it's there, you know it was expclicitly invalidated. If not, the server must have done it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!