• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EPratice Lab quiz 2 about event object that HttpSessionActivationListener implements

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you are right.

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