Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

methods in Listeners

 
Ganesh.P Ram
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Last night I was going through the listeners(ServletContextListener...) in HFSJ.
Do we have to remember all the method names in all those 8 listener interfaces.
What sort of questions are asked in the exam from the listener perspective.
Any leads ?
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should have a fair understanding about the methods in each interface.
The other things are,
1.Listener Events.
2.The listeners which need not register in the DD.
3.Its order of execution


Thanks..
[ March 14, 2006: Message edited by: Vinod NS ]
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Do we have to remember all the method names in all those 8 listener interfaces.


Yes you have to remember the method names. For example

For Request and Context listeners we got requestInitialized() and contextInitialized() methods whereas for session it is sessionCreated().

You also got to memorize their respective events.
 
Frederic Esnault
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you have to know the listeners, the method names, the method parameters (the actual event classes), AND the method available from the event. For exemple, know that HttpSessionEvent has a getSession() method to access the session your listening to.

Know also when listeners are loaded and in which order.
Know in which order they are invoked (both during webapp life and at webapp shutdown time (reverse order for this one)).

This is not a great amount of work, but definitely necessary.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic