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 invalidate vs. passivation

 
Tyler Wright
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

Was wondering if anyone would confirm some thoughts for me...

HttpSession.invalidate() is not the same as session passivation...
invalidate essentially unbinds all attributes and makes the session itself eligible for garbage collection.
passivation (as in sessionWillPassivate()), is when the session is migrated from one VM to another and may involve some form of persistence and serialized attributes will not be unbound from the session --is this right?

Also, object that are not serialized will be unbound --right?



Tyler
 
Nabila Mohammad
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this http://www.coderanch.com/t/167130/Web-Component-Certification-SCWCD/certification/HttpSessionActivationListener
 
Tyler Wright
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for that link Nabila, I had read it this morning...it does reinforce that passivation is used principally to migrate sessions between vms; but, I did not see that un serialized attributes of a passivating session would be unbound...

I think they would have to be, but I have found nothing to support my thought.

 
Nabila Mohammad
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tyler Wright wrote:Thanks for that link Nabila, I had read it this morning...it does reinforce that passivation is used principally to migrate sessions between vms; but, I did not see that un serialized attributes of a passivating session would be unbound...

I think they would have to be, but I have found nothing to support my thought.




Why would you think they are unbound...

If they are not serialized that means the attributes haven't been migrated ( as they have to be serialized for the migration)
But I dont think it means they get unboud automatically...
unless we do it ...
But then again .... it's my guess.. not sure...

Still juggling with the concepts !!
 
Tyler Wright
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I have found little in the way of documents on the web to say one way or the other...

I guess I might have to break down and buy the JSP 2.0 book...I saw some excerpts from it and was impressed with the depth of detail that the author goes into...

If I find an answer to the this I will post for all...

Tyler.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic