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

HttpSession question.

 
Anna Wang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone,

I met this question and I am not sure the answer. Can anyone give me the answer and explain it?


Which of the following statements are NOT true about the behavior of an HttpSession object in a distributable environment?
(Choose 2 answers)

A.) HttpSessionEvents are always propagated from one JVM to another
B. )An HttpSession can reside only on one JVM at a time.
C. )When a session migrates, all the session attributes that implement the HttpSessionActivationListener are notified
D. )When a session migrates, the readObject() and writeObject() methods of all its attributes are surely invoked.

BTW, where can I get more information about distributable envirooment?

Thank you very much.

Anna
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think answer is A and D (only attributes implementing serializable interface need to be migrated)
 
cheenu Dev
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no both a and d are wrong.
from spec pg no:61
Developers are not guaranteed that containers will call readObject and writeObject methods on session attributes if they implement them, but are guaranteed that the Serializable closure of their attributes will be preserved.

B is right. a session can reside at a time in only one jvm.
of course c is right.thats why we have session activation listener event.
BTW, where can I get more information about distributable envirooment?

nowhere than the spec.(SRV.7.7.2)
[ September 01, 2006: Message edited by: cheenu Dev ]
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question is asking about "NOT true behaviour" ....
 
Vikrant Pandit
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This thread has an important lesson for all the aspirants ....

"Read the questions carefully , otherwise you can screw a perfectly answerable question"
 
cheenu Dev
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
made a mistake.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic