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

HttpSessionBindingListener

 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
Can anybody help me out in the usage of HttpSessionBindingListener and associated classes with
sample codes.
For example when the client leaves the site without checking out where codings for session invalidation is
done, is there any other possiblity to use the above listener to invalidate the session.
Regards
Roshini
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roshini,
If your objects which are put in a user's session implement this special type interface, when the user's session is invalidated either through
1. Automatic session invalidation of servlet container (which is common as 30 min ), meaning if the user doesn't make requests to your site for a whole half-an-hour,
2. OR manual invalidattion like session.invalidate();
the user's session and associated data are automatically removed.
So if you want to catch-hold of that removal moment and do some cleanup operations, it is better way to make your session object implement this interface and write your code inside those appropriate methods of this interface.
I don't remember those method names. please look up the servlet API inside which method those cleanup (session-end related java code) must be put!
regds
maha anna

[This message has been edited by maha anna (edited March 23, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic