• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSessionActivationListener & HttpSessionBindingListener

 
sam siu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HF gave the diagram to show how ServletContextListener works and apparently container needs to create a instance of implemented ServletContextListener class to invoke the method. My question is how does it work for HttpSessionActivationListener and HttpSessionBindingListener when a attribute class implements these two interfaces? Does the container create another instance of attribute class to invoke the method or it has other mechanism to invoke the method.
 
Colin Fletcher
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which ones do you need to declare in the deployment descriptor?
 
sam siu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to register this class in DD because of HttpSessionActivationListener, if the attribute class implements only HttpSessionBindingListener, i don't have to register this class, right?
 
Colin Fletcher
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct. HttpSessionBindingListener does not need to be configured in the DD.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic