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 Tomcat and the fly likes Tomcat 6 clustering 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 » Products » Tomcat
Bookmark "Tomcat 6 clustering" Watch "Tomcat 6 clustering" New topic
Author

Tomcat 6 clustering

Gangadgar Prusty
Greenhorn

Joined: May 29, 2008
Posts: 1
Hi guys, I am configuring Tomcat 6 clustering to have more than one instance access to each others ServletContext attributes. It's said that ServletContext is clustered by default when Tomcat 6 is clustered, but my servlets in 2 different instances are not able to access each others ServletContext attributes. The Cluster elements added under the element Host in two different server.xml files in two different instances are given below.
In Tomcat Instance 1 :

<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true">

<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>

<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="127.0.0.1"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>

<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"/>
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
<ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

</Cluster>


In Tomcat Instance 2:

<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
expireSessionsOnShutdown="false"
useDirtyFlag="true">

<Membership
className="org.apache.catalina.cluster.mcast.McastService"
mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>

<Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
tcpListenAddress="127.0.0.1"
tcpListenPort="4002"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>

<Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
replicationMode="pooled"/>
<Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
<ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

</Cluster>


Pls. let me know if any more changes are needed. It's very urgent.
Thanks a lot in advance for your help.
Anand Srivastava
Greenhorn

Joined: Jun 10, 2008
Posts: 2
if you got the answer then please reply.
 
jQuery in Action, 3rd edition
 
subject: Tomcat 6 clustering
 
It's not a secret anymore!