File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Replication across clustered tomcat server, some problems

 
David Rocks
Ranch Hand
Posts: 162
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to set up a bunch of clustered servers and I am looking to get session replication across them.

So I deploy 2 servers next to each other and change the HTTP port on one from 8080 to 8090, I install my app that has a HttpSessionListener that simply writes out the session Id to the console, each server works perfectly on it's own.

I then uncomment this line in server.xml

<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

When I start up the servers I can see that they acknowledge each other but the problem is that each server gives out a new session.

Hit the 8080 server I get a new session
Hit the 8090 server I get a new session
Hit the 8080 server I get a brand new session
Hit the 8090 server I get a brand new session

And so on, Is there something I have to set so that the session is replicated and shared across the server.


Thanks
 
David Rocks
Ranch Hand
Posts: 162
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I got it. added

</distributable>

to the web.xml for the application.

Brings up new errors but they are serilizable issues that I can fix, so looks like I have got it
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic