• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Session Migration issues

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As pe the book session will get migrated across JVM in load balanced environment.
I need more information regarding session behavior of below given scenario

1. Client (window 1) gets session from Container A
2. Client (Window 2) makes a second request that gets passed on to Container B.
3. Container B asks for session object from Container A
4. Same time client opens second window
5. Client (Window 1) request is with Container B
6. Client (Window 2) request goes to Container A

As per the book across containers there will be only one session object present.

How will container A and container B respond to the situation.
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chetan Sahasrabudhe:
As pe the book session will get migrated across JVM in load balanced environment.
I need more information regarding session behavior of below given scenario

1. Client (window 1) gets session from Container A
2. Client (Window 2) makes a second request that gets passed on to Container B.
3. Container B asks for session object from Container A
4. Same time client opens second window
5. Client (Window 1) request is with Container B
6. Client (Window 2) request goes to Container A

As per the book across containers there will be only one session object present.

How will container A and container B respond to the situation.



Hi,

First thing that there is only one container spread accross the JVMS in the cluster. The default application run only on one JVM. You Can not selectively send the request to particular JVM, it is the job of load balancer. The load balancer normally dispatch the request, where the session exist. If the load balancer decide to migrate the session to another JVM, it will take care to migrate and dispatch the request. In the commercial application servers, the administrator can move one session from one JVM to another. But the load balancer take care of dispatching request to the appropriate JVM. Most of the time session migration is transperant to client user.

hope it help.

Thanks
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chetan Sahasrabudhe:

1. Client (window 1) gets session from Container A
2. Client (Window 2) makes a second request that gets passed on to Container B.
3. Container B asks for session object from Container A
4. Same time client opens second window
5. Client (Window 1) request is with Container B
6. Client (Window 2) request goes to Container A



A few pointers here. You never said if windows 1 and 2 were sharing a session. They may or may not, depending on how the second window gets created. Also, do you mean in step 4 that a third window is opened? Again, you never said how that window was opened.

Typically, if the subsequent window is spawned from the first it will share the same session. This can happen by clicking a link from within the first window or using a browser shortcut (Ctrl+N in IE) to clone your first window.

However, if the second window is created by opening a new instance of your browser (usually by selecting the application or shortcut from your desktop) it will not share the same session with the first window.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Narendra ,

Can you guide us to link on clustering and load balancing..

Would be of immense help!!!

Thanks,
Yogesh
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ho Yogesh,

Load balancing and Clustering is a very vast topic. In the above post I am talking about the clustering and load balancing at application server level. In the same line you can refer following URLs which give you idea. For the details you have to look up in particular application server documentation.

Reference 1 .

Reference 2

Hope this help

Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic