Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

load balancing & session management

Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all

pl. help me

how we maintain session management in case server load balancing.
pl. explain with example


SCJP 1.4, SCWCD 1.4, MCP
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is going to be specific to the type of server you are using. An application server is not required to support distributed applications, but most do.

Basically, servers that support load balancing and clusters maintain session information in some type of datastore that each cluster machine can access. If a request comes into a machine, and its session exists on a different machine, the container will migrate the session to the machine servicing the new request.

The key point here is that there is only one session per distributed application, and the application server handles all of the migration for you. You can use an HttpSessionActivationListener if you want trigger events when the session is migrated.
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also serialize session data onto a disk and allow a different machine reload that data. ... However, as mentioned above, it's server specific.
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic