• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EPratice Lab quiz 2 about event object that HttpSessionActivationListener implements

 
Himai Minh
Ranch Hand
Posts: 1359
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Which of the following listener's notification methods accepts the HttpSessionBindingEvent?

a.HttpSessionBindingListener
b HttpSessionActivationListener
c. All of the above

Choice C is correct

Both the listeners (HttpSessionBindingListener and HttpSessionActivationListener) accept the HttpSessionBindingEvent for their notification methods.
Following is the list of notification methods for the HttpSessionBindingListener listener.


HttpSessionActivationListener's sessionWillPassivate and sessionDidActivate accepts HttpSessionEvent object, not HttpSessionBindingEvent.
On the other hand, HttpSessionAttributeListener's attributeReplaced, attributeRemoved, attributeAdded accept HttpSessionBindingEvent.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2531
112
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right.

In this question the HttpSessionBindingListener accepts the HttpSessionBindingEvent. Option A is correct, not option C.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic