Try https://people.apache.org/~markt/dev/cluster-test.war instead.

Mark


On 12/06/2023 20:13, Manak Bisht wrote:
Thank you for the clarification. Sorry, it took me a while to understand
your point.
I have successfully changed the cluster settings,
For node with http port 8090
```
           <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6" channelStartOptions="3">
               <Manager
className="org.apache.catalina.ha.session.DeltaManager"
                 expireSessionsOnShutdown="false"
                 notifyListenersOnReplication="true"/>

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

                     <Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                         address="localhost"
                         port="8091"
                         autoBind="0"
                         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.TcpPingInterceptor"/>
                         <Interceptor
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
                         <Interceptor
className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
                            <LocalMember
className="org.apache.catalina.tribes.membership.StaticMember"
                               port="8091"
                               host="localhost"
                               uniqueId="{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}"
                               domain="delta-static"
                               />
                               <Member
className="org.apache.catalina.tribes.membership.StaticMember"
                                   port="8191"
                                   host="localhost"

uniqueId="{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}"
                                   domain="delta-static"
                                   />
                               </Interceptor>
                               <Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor"/>


                           </Channel>
                           <Valve
className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
                           <Valve
className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>

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

For node with http port
```
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6" channelStartOptions="3">

               <Manager
className="org.apache.catalina.ha.session.DeltaManager"
                 expireSessionsOnShutdown="false"
                 notifyListenersOnReplication="true"/>

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

                     <Receiver
className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                         address="localhost"
                         port="8191"
                         autoBind="0"
                         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.TcpPingInterceptor"/>
                         <Interceptor
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
                         <Interceptor
className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">

                             <LocalMember
className="org.apache.catalina.tribes.membership.StaticMember"
                                 port="8191"
                                 host="localhost"
                                 uniqueId="{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}"
                                 domain="delta-static"
                                 />
                                 <Member
className="org.apache.catalina.tribes.membership.StaticMember"
                                     port="8091"
                                     host="localhost"

uniqueId="{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}"
                                     domain="delta-static"
                                     />

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

                             </Channel>
                             <Valve
className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/>
                             <Valve
className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>

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

I am trying to run *examples/jsp/sessions/carts.jsp*. Both the webapps are
marked *<distributable /> *and I have implemented *Serializable *in
the *DummyCart.java
*class in both webapps. When viewed through the *manager/html* interface, I
can see the session status alternating between *primary *and *backup *status
as the requests alternate between the two nodes. The session id regardless
of which node is serving the request. *However, the state of the DummyCart
object is not shared between the two nodes even though the scope is defined
as session and the cart attribute is visible in the manager web interface.*


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to