This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes Session object in multihost environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session object in multihost environment" Watch "Session object in multihost environment" New topic
Author

Session object in multihost environment

Alex Grig
Ranch Hand

Joined: Oct 19, 2001
Posts: 38
Hello.
Suppose, i created session object at www.foo.com (or http://localhost:8080).
Could anyone explain me how to get this session object from different host my.foo.com (or http://localhost:8081).
So if session object lives in memory on the servlet container it must be some ways to keep session in multihost environment.

------------------
Alex J.Grig


Alex J.Grig
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16901
    
  26

It depends on your appserver - you'll have to RTFM.
Sessions are based on host URLs, so a true "multi host" session object sharing isn't appropriate. A clustered host, on the other hand, really SHOULD be capable of shared sessions if it intends to fully support having any server in the cluster able to service requests.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session object in multihost environment
 
It's not a secret anymore!