This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Listener confusion

 
Harshana Dias
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

HttpSessionBindingListener and HttpSessionActivationListener is for Attribute class itself right.

We dont need to declare those two Listeners in DD right? but in HFSJ said in page 256 they said HttpSessionActivationListener should declare in DD which is a mistake right.

Also it says HttpSessionActivationListener (in page 264) usually implement by an attribute class and some other class? what is this some other class? i guess its ususally implement only in attribute class right? is it an HFSJ mistake too?

Thank You.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We dont need to declare those two Listeners in DD right?

Right. Details are explained here.

what is this some other class?

I have no idea. It can be implemented by any class, but I think it only makes sense that attribute classes implement it.
 
Harshana Dias
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea. It can be implemented by any class, but I think it only makes sense that attribute classes implement it


its like they said,

HttpSessionListener-----------------------------usually implement by Some other class
HttpSessionActivationListener------------------usually implement by An attribute class and Some other class
HttpSessionBindingListener---------------------usually implement by An attribute class
HttpSessionAttributeListener--------------------usually implement by Some other class
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only attributes bound to a session will be notified. I can't see anything other than that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic