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

question about HttpSessionBindingListener interface

 
jeffrey z. lee
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which statements are correct about object implementing Which statements are correct about object implementing HttpSessionBindingListener interface?
1) valueBound method will be called before the object is accessible through getAttribute method
2) valueBound method will be called after the object is accessible through getAttribute method
3) valueUnbound method will be called before the object is removed from the session
4) valueUnbound method will be called after the object is removed from the session
 
Raj Paul
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 & 4 are the answer
 
jeffrey z. lee
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know why answer 1 is correct.
when the object with the implementation of HttpSessionBindingListener is being bound to a session,the valueBound method of the object is called .why is valueBound method called when the object is accessed ?
please help me, thanks
 
Raj Paul
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see the phrase
valueBound method will be called before the object is accessible through getAttribute method
valueBound method will be called, before the getAttribute method.. The sequence has been said here.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic