aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes session migration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "session migration" Watch "session migration" New topic
Author

session migration

rachna jain
Ranch Hand

Joined: Jul 14, 2009
Posts: 74
Hi All

Can someone calrify this point

when session is migated its httpsession goes with it

as per my understanding session is not duplicated rest everything is duplicayted and new id is created on new JVM.
one session can not exist at two places simultaneously.

Please explain


Rachna Jain

SCWCD 1.5
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
as far as i understood that topic a session is not duplicated across jvms ...

that means if a session needs to migrate, the session object and all it's attributes (which need to be serializable) are -well -serialized and shipped to the second jvm ...
so there is no copy of the session on the migrating jvm ...


JDBCSupport - An easy to use, light-weight JDBC framework -
rachna jain
Ranch Hand

Joined: Jul 14, 2009
Posts: 74
yes thats waht my understanding says but mock test gives answer that

when session migrated httpsession goes with it.I think its incorrect

its from HFS 2ND EDITION page no-820 q-58
option B is correct



Can someone clear my doubt

Thanks
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
i have that book and i just checked the question ...

answer b is correct "When a session i migrated, its HttpSession goes with it" ...

that's exactly what we said ...

The HttpSession object is serialized and shipped to the second jvm, w/o having a copy left on the migrating jvm ...
rachna jain
Ranch Hand

Joined: Jul 14, 2009
Posts: 74
Thanks a lot.....i got confused with session with httpsession object.
Michael Angstadt
Ranch Hand

Joined: Jun 17, 2009
Posts: 272

I have a question about this. So, when a session migrates, the only attributes it brings with it are the attributes that implement Serializable. So if an attribute does NOT implement Serializable, then the attribute is lost?


SCJP 6 || SCWCD 5
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
nope.

the migration will fail .. all attributes will have to be serializable
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session migration
 
Similar Threads
JSP session
session problem
HttpSession
Servlet session
Need to reset HTTP Session Timer