Hi,

 

I’d just configure a tomcat’s cluster with two nodes. The version of Tomcat
is 6.0.24 with JRE 6.0.15 on Ubuntu 9.10.

 

Cluster’s part of my “Server.xml”:

 

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

                 channelSendOptions="8">

 

          <Manager className="org.apache.catalina.ha.session.DeltaManager"

                   expireSessionsOnShutdown="false"

                   notifyListenersOnReplication="true"/>

 

          <Channel
className="org.apache.catalina.tribes.group.GroupChannel">

            <Membership
className="org.apache.catalina.tribes.membership.McastService"

                        address="228.0.0.4"

                        port="45564"

                        frequency="500"

                        dropTime="3000"/>

            <Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"

                      address="192.168.1.108"

                      port="4000"

                      autoBind="100"

                      selectorTimeout="5000"

                      maxThreads="6"/>

 

            <Sender
className="org.apache.catalina.tribes.transport.ReplicationTransmitter">

              <Transport
className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>

            </Sender>

            <Interceptor
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"
/>

            <Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15In
terceptor"/>

          </Channel>

 

          <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"

                filter=".*index.*;"/>

          <Valve
className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>

 

          <Deployer
className="org.apache.catalina.ha.deploy.FarmWarDeployer"

                    tempDir="/tmp/war-temp/"

                    deployDir="/tmp/war-deploy/"

                    watchDir="/tmp/war-listen/"

                    watchEnabled="false"/>

 

          <ClusterListener
className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>

          <ClusterListener
className="org.apache.catalina.ha.session.ClusterSessionListener"/>

        </Cluster>    

 

 

Clustering connection work well and I see members appear or disappear in the
log file.

 

Log node 1:

 

INFO: Created a buffer pool with max size:104857600 bytes of
type:org.apache.catalina.tribes.io.BufferPool15Impl

25 févr. 2010 14:35:42 org.apache.catalina.ha.tcp.SimpleTcpCluster
memberAdded

INFO: Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1,
108}:4000,{192, 168, 1, 108},4000, alive=1019,id={93 73 -36 -95 -25 79 67 32
-89 30 -119 95 -9 24 87 -24 }, payload={}, command={}, domain={}, ]

 

Log node 2: 

 

INFO: Starting clustering manager at /SessionListener

25 févr. 2010 14:35:45 org.apache.catalina.ha.session.DeltaManager
getAllClusterSessions

ATTENTION: Manager [/SessionListener], requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1,
115}:4000,{192, 168, 1, 115},4000, alive=57336,id={35 -70 -95 77 106 -12 71
31 -111 47 -36 105 30 78 -58 60 }, payload={}, command={}, domain={}, ].
This operation will timeout if no session state has been received within 60
seconds.

25 févr. 2010 14:35:45 org.apache.catalina.ha.session.DeltaManager
waitForSendAllSessions

INFO: Manager [/SessionListener]; session state send at 25/02/10 14:35
received in 120 ms.

 

I’d just have any questions regarding filter of replication valve.

 

The filter receive java regular expressions and keep out all object
corresponding with filter, Can I use expression “^[.*specific_folder.*];” as
filter for limited the replication of data to a little part of application
where was deployed in a specific folder ? 

 

And when object must be keep out, send tomcat a replicated session empty or
don’t send a session ? 

 

Thank you for your work, it’s very precious for noob like me :-)

 

 

Reply via email to