• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in Session Related Question -

 
Ganesh Kannusamy
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
I came across a question in Deshmukh book - "Session Management"
Question: Which of the following methods will be invoked on a session attribute that implements appropriate interfaces when the session is invalidated ?

a - SessionDestroyed of HttpSessionListener
b - AttributeRemoved of HttpSessionAttributeListener
c - valueUnBound of HttpSessionBindingListener
d - sessionWillPassivate of HttpSessionActivationListener

Answer : c

I thought the answer as 'a', but it is 'c' Please explain...

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Ganesh Kannusamy
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben, I have Updated my Last name ...

Question: Which of the following methods will be invoked on a session attribute that implements appropriate interfaces when the session is invalidated ?

a - SessionDestroyed of HttpSessionListener
b - AttributeRemoved of HttpSessionAttributeListener
c - valueUnBound of HttpSessionBindingListener
d - sessionWillPassivate of HttpSessionActivationListener

Answer : c

I thought the answer as 'a', but it is 'c' Please explain...
 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
original session itself getting invalidated, in that case why you are bothered about binding object in the session, it's not an object which is bounded to any perticular session or set in any session as an attribute.

it's on the whole a session object. so in that case option 'a' is correct.
hope this helped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic