This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubts on Http session migration & Serialization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubts on Http session migration & Serialization " Watch "Doubts on Http session migration & Serialization " New topic
Author

Doubts on Http session migration & Serialization

XiuQing Lin
Greenhorn

Joined: Nov 28, 2006
Posts: 3
Hi,

On page 258 of Head First Book abt Http session migration & Serialization , it says:
"A Container is required to migrate Serializable attributes......
.....But a Container is not required to use Serialization as the means of migrating the session....".

I am confused here. Does that mean:

1) If you want the instance variables of a attribute to be saved & restored, you wld EITHER hv to make the attribute class Serializable OR implement the mtds of HttpSessionActivationListener class if your attribute class is not Serializable? Another qn, but the attribute wld guaranteed be migrated anyways(just that the values of its instance variables may not)?


2) Also, we cld use readObject() & writeObject() mtds of a serializable attribute class to save & restore its non-serializable/transient instance variables. And since the Container MAY not run readObject() & writeObject() mtds during session migration, we ought to implement the mtds of HttpSessionActivationListener class to save such instance variables then?


Thanks a lot for reading. Have a nice day ahead.


SCJP 5.0<br />SCWCD 1.4 - Preparing
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
i found this in FREDERIC pdf
Tridib Samanta
Ranch Hand

Joined: Apr 28, 2004
Posts: 128
Where can I find this FREDERIC pdf?


Thanks, Tridib
SCJP 1.4, SCWCD 1.4, SCBCD 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubts on Http session migration & Serialization
 
Similar Threads
need clarification about distributed container ??
Session Migration Pg 269 HFSJ
global session counter
HttpSessionActivationListener example
Session Migration