Bug 35916

Summary: Session listeners not called on cluster server restart
Product: Tomcat 5 Reporter: R <rh3_sp>
Component: Catalina:ClusterAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: josephlam
Priority: P2    
Version: 5.5.9   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description R 2005-07-28 16:24:33 UTC
Hi,

I think there is a bug at DeltaManager class. I have set up 2 local tomcat 
servers. My application implements HttpSessionListener, 
HttpSessionAttributeListener and HttpSessionActivationListener. All the methods 
of those interfaces are called when needed, so no problems yet.
When I shutdown one of the servers, sessionDestroyed is called (only on the 
server being shutdown) for each session. However, when I start that server 
again and it receives the active sessions from the other server, neither 
sessionCreated nor sessionDidActivate methods are called for each active 
session received from the other server. I think one of them should be called on 
the server being started up.
Here is my cluster configuration, just in case it helps:

-------------------

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

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

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

    <Sender
        className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
        replicationMode="pooled"
        ackTimeout="15000"/>

    <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
           
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>

</Cluster>

-------------------

Thank you very much!
Comment 1 Peter Rossbach 2005-10-20 08:23:10 UTC
Thanks for pointing this out.

Fix this at 5.5.13.

Comment 2 Peter Rossbach 2005-10-20 08:52:56 UTC
*** Bug 33782 has been marked as a duplicate of this bug. ***
Comment 3 R 2005-10-29 02:33:24 UTC
You're welcome. Thank you for your work!