File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes sharing session among two servers in a distributed application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "sharing session among two servers in a distributed application" Watch "sharing session among two servers in a distributed application" New topic
Author

sharing session among two servers in a distributed application

Pratibha Malhotra
Ranch Hand

Joined: Dec 21, 2003
Posts: 199
How can we share session among two servers lying on two different machines in a distributed application.
David Bridgewater
author
Ranch Hand

Joined: Apr 29, 2004
Posts: 44
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sharing session among two servers in a distributed application