GeeCON Prague 2014*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Session Migration Pg 269  HFSJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Session Migration Pg 269  HFSJ" Watch "Session Migration Pg 269  HFSJ" New topic
Author

Session Migration Pg 269 HFSJ

Nishant Dhar
Greenhorn

Joined: Sep 09, 2005
Posts: 26
Pg 269 HFSJ Q12

D is also a correct choice for Q12

From what i understood, even if an attribute implements Serializable, the instance variables of the attribute class may not survive migration since the readObject and writeObject methods are never called by the container/

So isnt there a chance that an attribute class that implements Serializable but not HttpSessionActivationListener may not be transferred (or maynot be transferred properly) to the new JVM

So how can D be correct.

maybe I havent understood something properly :-)
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

Can you post the question please ?

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
Nishant Dhar
Greenhorn

Joined: Sep 09, 2005
Posts: 26
Q) Which statements about HttpSession objects in distributed environment is true?

A) When a session is moved from one JVM to another, attribute values that implement java.io.Serializable will be transferred to the new JVM

i think the above is not correct. can anyone explain this option to me
Ner min
Ranch Hand

Joined: Sep 14, 2005
Posts: 76
When a session is moved from one JVM to another all attributees r moved too anyway.

So it is up to you do you make u'r att's implement java.io.Serializable or not. If u not u might not get waht u have accepted, becouse the container is not responsible to take care for u.

The question is a bit tricky couse it makes u to much pay attention on Serializable or not. BUT the point is that doesnt metter.

imo when a session is moved from one JVM to another ALL ATTs R MOVED, serializable or not.

please someone corret me if im wrong
Nishant Dhar
Greenhorn

Joined: Sep 09, 2005
Posts: 26
Ok .. so I understand that all the attributes move anyway when there is a session migration. however the instance variables of those attributes that are not serializable will be lost/destroyed which implement Serializable but do not implement HttpSessionActivationListener

am i correct ???
Ner min
Ranch Hand

Joined: Sep 14, 2005
Posts: 76
yes but that was not the question
 
GeeCON Prague 2014
 
subject: Session Migration Pg 269 HFSJ