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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "session in the distribution application" Watch "session in the distribution application" New topic
Author

session in the distribution application

xiaoma wang
Ranch Hand

Joined: Mar 04, 2002
Posts: 74
hi, everyone:
I am not clear that whether the session object keep the same when the session migrates from one JVM to another JVM? Can session object span the multiple JVMs?
Thanks in advance!
Xiaoma Wang
Thomas Hubschman
Ranch Hand

Joined: Sep 25, 2002
Posts: 88
Yes the session object can migrate across multiple JVMs. You can keep track of it's progress via the HttpSessionActvationListener.
Hope this helps,
Thomas


SCJP '02, SCWCD '02, SCJD '08, SCSNB '09, SCEA '10
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3206
    
    2
Originally posted by xiaoma wang:
hi, everyone:
I am not clear that whether the session object keep the same when the session migrates from one JVM to another JVM? Can session object span the multiple JVMs?
Thanks in advance!
Xiaoma Wang

A session object can reside on only one JVM at a time. It can migrate accross JVMs but it cannot "span" accross JVMs, ie. it cannot exist on more than multiple JVMs at simultaneously.


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
xiaoma wang
Ranch Hand

Joined: Mar 04, 2002
Posts: 74
hi, guys:
Thank you so much for the replies. I understand it now. What i want to do is to store a session bean reference in the session object and i did not know what would happen when the session object is migrated among the JVMs. Now i know that i can retrive the session bean reference from the session object, no matter which JVM it is on.
Xiaoma Wang
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: session in the distribution application
 
Similar Threads
HttpSessionActivationListener
session migration
session listener
Pass session information to browser
Jsp implicit variable