File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Session Migration" Watch "Session Migration" New topic
Author

Session Migration

Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi, In a distributed web application(that participates in session management), if user-A(who uses session) sends a request, the load blancing server decides to which server the request has to go, say if it is server-A and VM1, then the server-A makes a new session object with unique ID and sends response to the user through cookie.

Next time the user-A makes another request, this time if the load balancing server sends the request to another server say server-B and VM2, then server-B sees the session id and knows this particular session object is present in Server-A and VM1. Then migration happens.
My question is how the server-B knows that this particular session object is present in server-A? Thankyou.
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 288

This is Vendor specific the session migration may not present also. J2EE Spec is not telling about this i this.

But in the HF JSP servlet page no256 they telling they have to do the replication on the each node/VM


-Chiru
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi, Chiranjeevi. Thanks for your reply. Yes, this is vendor specific. Can you please explain,what are the possible solutions, that the vendor may implement? Thankyou.
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 288

what are the possible solutions, that the vendor may implement?


No Chinmaya, i dont have that much idea

But in that she is telling that(in High level) the replicate the session to all the nodes.
we can try in the tomcat implementation but i dont know how we will be success in that
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Any possible solutions please?
Dumitru Postoronca
Ranch Hand

Joined: May 06, 2008
Posts: 46
Store in the database the session id and the associated machine IP ? (this would be slow as hell, but it's one way of doing this).
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi Dumitru. Thanks for your reply. Even it is slower, I think this is one solution.

If we store session id and ip address of the underlying system in a map object, and store the map object in application context. Is this approach is good? Any possible solutions? Thankyou.
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Hi Chimmaya,

I never would have not expected if someone had already posted the question, I have been wondering and about to post!

The way I satisfied whilst going through this topic was load balancing server would maintain a list of session ids mapped to servers. So, whenever a second request comes through, the load balancing server tells server B that this session id already present in server A, then server B makes it to the session to migrate.

I may not be giving right information here but for the exam I have to focus on many more other things than wasting time, so I have got over with these kind of obscure things.

Cheers,
Naren


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi, Naren. Thaks for your reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session Migration
 
Similar Threads
Chapter 6(Session Management) notes (HFSJ) for revision
Session Migration issues
j2ee certificate ques
doubt in Sessin Migration
Question regarding Session Migration