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

HFSJ Pg. 254

 
Abhishek Kumar Singh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain the BANG box on pg 254.
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you explain what you do not understand or articulate your questions and I will be happy to help you.
 
Abhishek Kumar Singh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which listeners must be registered in the DD and which are not?why?
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Except HttpSessionBindingListener all others need to be registered in DD.

HttpSessionBindingListener is implemented by the objects which need notification when they are bound, unbound and removed from a scope.

In case of other listeners there is no way a container can find out which class to notify about a particular event unless we expilcitly tell the container about that class.

Hope that helps.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amol, you're missing one. Please refer to this FAQ.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ohhh yes christophe, that is a bad miss.
[ September 17, 2007: Message edited by: Amol Nayak ]
 
madhuri rajan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But if we have a non-attribute class implement HttpSessionActivationListener, dont we need to declare the listener in DD?

Thanks,
Madhuri
 
Nileesha Bojjawar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
Please correct if my understanding below is true.

If you dont have a non-attribute class implementing the HttpSessionActivationListener, then you will still need a kind of observer pattern to communicate the session event activate or passivate to this non-attribute class. Containers will not probably understand this Listener if declared in the DD.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic