Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Listener Question

 
Sethu Prem
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody explain me the difference between
HttpSessionBindingListener and HttpSessionAttributeListener

1. Do they differ only by the object type they handle ?

2. Is there any order in which the listeners are invoked when a session
is being invalidated or being destroyed ?

Thanks
SP
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An object of the class that implements HttpSessionBindingListener interface will be informed when it is added/deleted (bound/unBound) from the session.

An object of the class that implements HttpSessionAttributeListener interface will be informed whether an attribute has been added/removed/replaced from the session.

HttpSessionBindingListener will be invoked before HttpSessionAttributeListener when an Object is bound/unBound from the session.
[ October 05, 2005: Message edited by: vishnu prakash ]
 
Sethu Prem
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the explanation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic