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

Session

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i want to ask you, what's the differnce between session is being destroyed and session becoming invalid?

As per me, both should invoke the same listener as sessionDestroyed?
but this is not true, i can't say unless i get the above differnce clear.

PLease advice.
 
kurt hanni
Ranch Hand
Posts: 140
Eclipse IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you mean by "session is being destroyed"?

Its both the same, when a session is invalidated its also considered destroyed and vice-versa.

Sessions can only die when:
1.invalidating them manually
2.when it times out (in DD or code)
3.when server crashes/shutdown

all will call sessionDestroyed() if implemented, except when server crashes.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't think this is right. Because in one of the mock question's i came to know when the session is destroyed different event takes place then when the session becomes invalid.

Now i am not able to recall which mock question it was.
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sessionDestroyed of HttpSessionListener is called when the session is destroyed/invalidated. I do not think session destruction is any different from invalidation. Can you please quote the question on this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic