Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Conflicting information on listener registration in dd and when notifications are sent...

 
Tyler Wright
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I was seeing a lot of conflicting information on the use of the javax.servlet.http.HttpSessionActivationListener and on when the container makes notifications about events.

I went to Servlet 2.4 spec and read the following:
javax.servlet.http.HttpSessionActivationListener and javax.servlet.http.HttpSessionBindingListener are implemented on objects and DO NOT require registration in the deployment descriptor.


Then in javax.servlet.http.HttpSession I saw clarification on when the container sends notifications to valueBound() and valueUnbound() methods on HttpSessionBindingListener:
Notifications are sent after the binding methods complete.


Many of the mock exams and study notes on these points are based on the old Servlet spec and therefore give wrong information and answers.

I hope this is helpful...moral of the story: when in doubt, check the spec...
 
Nabila Mohammad
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for pointing it out!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic