Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Session migration

Posts: 9
IntelliJ IDE Windows XP Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have finished reading HFSJ second time and currently am preparing for the exam with the help of Enthuware JWeb Plus V5.

The question(QID com.enthuware.ets.scwcd.v5.2.328) is "Assuming that a web application is marked as distributed, which of the following statements are correct:" and one of the correct answers was "All request that belong to a session are handled by one JVM at a time."

Could somebody please explain this to me? I thought that session migration happens exactly when different requests come for one session to different JVMs.

How I understand it:
Say a user has made request1, which was sent to JVM1 and which created a session. Then the users make request 2 and it is sent to another JVM, say, JVM2. The container sees that the session associated with this request is on JVM1 and migrates the session object to JVM2. That is when SessionActivationListener gets informed.

Am I wrong?

If "All request that belong to a session are handled by one JVM at a time." then in what case does the migration happen?
Creator of Enthuware JWS+ V6
Posts: 3346
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stanislav,

By reading your story I think that you understood it well.

But what the authors (enthuware) might have wanted to say is that there are not two requests handled by two JVMs at the same time. The Session object is not replicated but migrated. If the Session object was available in both JVMs at the same time it could handle each incoming request without having to migrate.

Hope this makes a bit more sense.

The moth suit and wings road is much more exciting than taxes. Or this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic