• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Session Migration Pg 269 HFSJ

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 :-)
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can you post the question please ?

Thanks
 
Nishant Dhar
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes but that was not the question
 
Hey! Wanna see my flashlight? It looks like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic