• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

listener classes methods

 
Eshu San
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I saw the API for listener classes like HttpSessionListener,HttpSessionActivationListener,
HttpSessionAttributeListener from the sun site .i was confused with the information of when each methods in the API will be called.ie.Take for ex.HttpSessionListener which has methods sessionCreated() and sessionDestroyed().will the sessionCreated method be called after the session has been created or even before the session is created.will the sessionDestroyed() be called after the session is destroyed or before that.Likewise i have doubts in all the methods in the listener classes.Can someone clarify this to me clearly.

Thanks
 
Paul Croarkin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw the API for listener classes like HttpSessionListener,HttpSessionActivationListener,
HttpSessionAttributeListener from the sun site .i was confused with the information of when each methods in the API will be called.ie.Take for ex.HttpSessionListener which has methods sessionCreated() and sessionDestroyed().will the sessionCreated method be called after the session has been created or even before the session is created.will the sessionDestroyed() be called after the session is destroyed or before that.Likewise i have doubts in all the methods in the listener classes.Can someone clarify this to me clearly.


HttpSessionListener
sessionCreated - Notification that a session was created.
sessionDestroyed - Notification that a session is about to be invalidated.

Seems clear to me that sessionCreated is called after a session is created and sessionDestroyed is called right before it is finally invalidated giving you a chance to do some cleanup.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic