• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session Migration

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all...

I need a clarification on the following.

"Session migration (if supported) is guaranteed to occur between user requests." - Is this statement true?? My interpration of the above is that the session migrates between two requests from the same client.

My understanding was that session migration was upto the load balancer when an application was distributed. Am I wrong?

Cheers...
 
Anand Jayaraman
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And by the way, that was one question on
Java Blackbelt 's SCWCD mock test.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
Definately it is for the same client...no doubt about it...a session is meant for only one client and not for multiple users...and session migration issues comes when we have more than one JVM running in same or different systems...
bye
kumar
 
Anand Jayaraman
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kumar...

Yes, a session is for a client, but that still doesn't answer my question. What determines a session migration? Is it guaranteed that when an application is deployed in a distributed environment, for every request that comes in sessions will migrate (OR) is it upto the load balancer to decide whether or not to migrate the session?


Cheers
 
Kumar J
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
Load balancer only decides to choose a particular VM,if it is a different VM than the present one where the session IS,session migration will happen...is taken care by the container...
you can refer to hfsj sessions chapter for further clarification...
bye
kumar
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a little bit confused.

According to the Servlet 2.4 spec, SRV 7.7.2 page 60, the process of session migration will be handled by container-specific facilities. While according to HFS&J book, there is a certain level of assurance that the session is not replicated, and that each request will "somehow" try to find which VM is holding its session.

OTOH, according to this implementation by Tomcat/WADI
Tomcat Clustering How-To
WADI - Frequenty Asked Questions
the session is actually being replicated.

I can't find any implementation information by WebLogic, OC4J or Websphere. I'm assuming that JBoss uses the same implementation as Tomcat & WADI.
Which one is the correct behavior? Is HFS&J wrong? Is HFS&J making its own assumption on how the implementation would be like, based on the Servlet 2.4 spec? Is Tomcat/WADI implementation also a valid Servlet 2.4 spec implementation?

- eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic