You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dennis <de...@muhlesteins.com> on 2005/07/27 19:42:41 UTC

Clustering and the useDirtyFlag

I've been working with a cluster of tomcat servers and wanted to change
the useDirtyFlag to false so that the session is replicated after every
request whether or not it was changed.

Here is my modified server.xml fragment:
---CUT---
<Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                 expireSessionsOnShutdown="false"
                 useDirtyFlag="false"
---END CUT---

After restarting the servers in the cluster, I noticed that the behavior
was the same as with the flag set to true.  Objects in the session
quickly become out of sync across the multiple servers because they are
getting modifed but setAttribute is not being called.

I searched around google and the mail archive a bit but didn't find any
references to people having trouble with this.  Before I started digging
in the clustering code, I thought I'd see if anyone has any idea as to
whether or not I have the correct expectation of the useDirtyFlag or if
there might be some other problem.

I'm using Tomcat 5.5.9.

Thanks
Dennis

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering and the useDirtyFlag

Posted by Dennis <de...@muhlesteins.com>.
Dennis wrote:

>I've been working with a cluster of tomcat servers and wanted to change
>the useDirtyFlag to false so that the session is replicated after every
>request whether or not it was changed.
>
>Here is my modified server.xml fragment:
>---CUT---
><Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
>                
>managerClassName="org.apache.catalina.cluster.session.DeltaManager"
>                 expireSessionsOnShutdown="false"
>                 useDirtyFlag="false"
>---END CUT---
>  
>
To answer my own problem.. DeltaManager ignores the useDirtyFlag.  I
changed it to SimpleTcpReplicationManager and got the desired effect.

Possibly DeltaManager has a bug because the session, although changed,
was not replicated.

>After restarting the servers in the cluster, I noticed that the behavior
>was the same as with the flag set to true.  Objects in the session
>quickly become out of sync across the multiple servers because they are
>getting modifed but setAttribute is not being called.
>
>I searched around google and the mail archive a bit but didn't find any
>references to people having trouble with this.  Before I started digging
>in the clustering code, I thought I'd see if anyone has any idea as to
>whether or not I have the correct expectation of the useDirtyFlag or if
>there might be some other problem.
>
>I'm using Tomcat 5.5.9.
>
>Thanks
>Dennis
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org