• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSessionActivationListener

 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. On page 264 of Head First Servlets it says that the HttpSessionActivationListener can be implemented by an attribute class or by some other class. I can see clearly how/why one implements it for an attribute class. But why would one implement it for some other class (a non-attribute)? And, if it is implemented for a non-attribute class, must it then be listed in the DD?

Many thanks!
John
 
Rufus Addis
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect that HFSJ may be wrong in this respect.

The specs only seem to mention attributes:

HTTPSessionActivationListener :
Objects that are bound to a session may listen to container events notifying them that sessions will be passivated and that session will be activated. A container that migrates session between VMs or persists sessions is required to notify all attributes bound to sessions implementing HttpSessionActivationListener.

HTH - Rufus.
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool! Are there prizes for finding errors in the book???
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there prizes for finding errors in the book???

No but you can contribute to make the book better by sending your errata at the publisher's homepage.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic