File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes How to keep a session on several servers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to keep a session on several servers" Watch "How to keep a session on several servers" New topic

How to keep a session on several servers

Miguel Onofre

Joined: Sep 19, 2001
Posts: 1
Hi everybody
Could anyboy tell me how to keep
a session created on a previous server and
maintained on any other server?
I heard something about cascading sessions
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

This sounds application server specific, which server are you using?

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Aruna Gopalakrishnan

Joined: Feb 14, 2002
Posts: 8
I have also posted a query something similar to this. So please let me know in case if you find answer for your question. We are using Websphere application server and Jserv as webserver.
I will also let you know in case if i come to know any answer.
Best Regards
Aruna G

Best Regards<br />Aruna G
DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
Im pretty sure sessions, like cookies are server specific. I really dont think its possible to save them across different domains. This drops into the realm of security problems & if Im not mistaken this type of session behaviour isnt allowed due to the fact that if you could do it people would be trying to grab user info from other sites constantly.
Al Green

Joined: Feb 09, 2002
Posts: 10
The servlet2.2/3 spec does not define support for distributed sessions. It is definitely server specific at best. So don't expect your webapp to be portable. There are various articles out there describing tactics to realize this requirement. One on javaworld a while back was entitled "Distributed Sessions" and the method behhind it was using RMI to synch all of the sessions.
In short, there are no nice simple solutions, yet.
I agree. Here's the link:
subject: How to keep a session on several servers
It's not a secret anymore!