• 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

sharing session among two servers in a distributed application

 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can we share session among two servers lying on two different machines in a distributed application.
 
author
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rewa,

That will depend on the application server you are dealing with.

I happen to be familiar with IBM WebSphere Application Server. As an administrator, you can switch on session replication across the running instances of your distributed application (and there are different options with different performance/failover trade-offs). You also have some configuration to do in the associated web server (usually IBM Http Server).

I don't know the answer for open source application servers, but I think you will find plenty of resources to help you. Here is a thread which talks about clustering with Tomcat (as the web container) and Apache (as the web server):

ServerSide.com discussion on Tomcat / Apache clustering

Whichever tools you are using, you shouldn't have to alter your coding approach - the session object should be up-to-date and available to whichever running instance your requests go to.

HTH -

David.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic