Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 56084 invoked from network); 30 Jul 2010 03:01:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jul 2010 03:01:18 -0000 Received: (qmail 57363 invoked by uid 500); 30 Jul 2010 03:01:18 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 57102 invoked by uid 500); 30 Jul 2010 03:01:16 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 57093 invoked by uid 99); 30 Jul 2010 03:01:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 03:01:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 30 Jul 2010 03:01:11 +0000 Received: (qmail 55282 invoked by uid 99); 30 Jul 2010 03:00:49 -0000 Received: from localhost.apache.org (HELO mail-vw0-f45.google.com) (127.0.0.1) (smtp-auth username kfujino, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 03:00:49 +0000 Received: by vws19 with SMTP id 19so828389vws.18 for ; Thu, 29 Jul 2010 20:00:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.62.72 with SMTP id w8mr707761vch.69.1280458848176; Thu, 29 Jul 2010 20:00:48 -0700 (PDT) Received: by 10.220.171.5 with HTTP; Thu, 29 Jul 2010 20:00:48 -0700 (PDT) In-Reply-To: <20100729094533.30C202388900@eris.apache.org> References: <20100729094533.30C202388900@eris.apache.org> Date: Fri, 30 Jul 2010 12:00:48 +0900 Message-ID: Subject: Re: svn commit: r980378 - in /tomcat/trunk: java/org/apache/catalina/ha/ java/org/apache/catalina/ha/session/ java/org/apache/catalina/ha/tcp/ webapps/docs/config/ From: Keiichi Fujino To: Tomcat Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi. SimpleTcpCluster#sendClusterDomain called when domainReplication is true is as follows now. =3D=3D=3DSimpleTcpCluster#sendClusterDomain=3D=3D=3D public void sendClusterDomain(ClusterMessage msg) { send(msg,null); } =3D=3D=3D =3D=3D=3D the msg is transmitted to all cluster members. domainReplication does not work correctly. Tomcat7 and Tomcat6 have org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor. If DomainFilterInterceptor is used, session can be sent only to the same domain. Is DomainFilterInterceptor used instead of domainReplication? --=20 Keiichi.Fujino 45:32 2010 > New Revision: 980378 > > URL: http://svn.apache.org/viewvc?rev=3D980378&view=3Drev > Log: > Remove deprecated defaultMode attribute > Clarify current behaviour of maxActiveSessions > Clean-up cluster-manager docs > > Modified: > =A0 =A0tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java > =A0 =A0tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.jav= a > =A0 =A0tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java > =A0 =A0tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java > =A0 =A0tomcat/trunk/webapps/docs/config/cluster-manager.xml > > Modified: tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/h= a/ClusterManager.java?rev=3D980378&r1=3D980377&r2=3D980378&view=3Ddiff > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java (origina= l) > +++ tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java Thu Jul = 29 09:45:32 2010 > @@ -91,17 +91,6 @@ public interface ClusterManager extends > =A0 =A0 */ > =A0 =A0public void setDomainReplication(boolean domainReplication); > > - =A0 /** > - =A0 =A0* @param mode The mode > - =A0 =A0* @since 5.5.10 > - =A0 =A0*/ > - =A0 public void setDefaultMode(boolean mode); > - > - =A0 /** > - =A0 =A0* @since 5.5.10 > - =A0 =A0*/ > - =A0 public boolean isDefaultMode(); > - > =A0 =A0public ReplicationStream getReplicationStream(byte[] data) throws = IOException; > > =A0 =A0public ReplicationStream getReplicationStream(byte[] data, int off= set, int length) throws IOException; > > Modified: tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.= java > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/h= a/session/BackupManager.java?rev=3D980378&r1=3D980377&r2=3D980378&view=3Ddi= ff > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java (= original) > +++ tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java T= hu Jul 29 09:45:32 2010 > @@ -94,18 +94,6 @@ public class BackupManager extends Stand > =A0 =A0 public void setDomainReplication(boolean sendClusterDomainOnly) { > =A0 =A0 } > > - =A0 =A0/** > - =A0 =A0 * @return Returns the defaultMode. > - =A0 =A0 */ > - =A0 =A0public boolean isDefaultMode() { > - =A0 =A0 =A0 =A0return false; > - =A0 =A0} > - =A0 =A0/** > - =A0 =A0 * @param defaultMode The defaultMode to set. > - =A0 =A0 */ > - =A0 =A0public void setDefaultMode(boolean defaultMode) { > - =A0 =A0} > - > =A0 =A0 public void setExpireSessionsOnShutdown(boolean expireSessionsOnS= hutdown) > =A0 =A0 { > =A0 =A0 =A0 =A0 mExpireSessionsOnShutdown =3D expireSessionsOnShutdown; > > Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.j= ava > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/h= a/session/DeltaManager.java?rev=3D980378&r1=3D980377&r2=3D980378&view=3Ddif= f > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (o= riginal) > +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Th= u Jul 29 09:45:32 2010 > @@ -88,7 +88,6 @@ public class DeltaManager extends Cluste > =A0 =A0 =A0*/ > =A0 =A0 protected static String managerName =3D "DeltaManager"; > =A0 =A0 protected String name =3D null; > - =A0 =A0protected boolean defaultMode =3D false; > =A0 =A0 private CatalinaCluster cluster =3D null; > > =A0 =A0 /** > @@ -474,20 +473,7 @@ public class DeltaManager extends Cluste > =A0 =A0 } > > > - =A0 =A0/** > - =A0 =A0 * @return Returns the defaultMode. > - =A0 =A0 */ > - =A0 =A0public boolean isDefaultMode() { > - =A0 =A0 =A0 =A0return defaultMode; > - =A0 =A0} > - =A0 =A0/** > - =A0 =A0 * @param defaultMode The defaultMode to set. > - =A0 =A0 */ > - =A0 =A0public void setDefaultMode(boolean defaultMode) { > - =A0 =A0 =A0 =A0this.defaultMode =3D defaultMode; > - =A0 =A0} > - > - =A0 =A0public CatalinaCluster getCluster() { > + =A0 public CatalinaCluster getCluster() { > =A0 =A0 =A0 =A0 return cluster; > =A0 =A0 } > > > Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.j= ava > URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/h= a/tcp/SimpleTcpCluster.java?rev=3D980378&r1=3D980377&r2=3D980378&view=3Ddif= f > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (o= riginal) > +++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Th= u Jul 29 09:45:32 2010 > @@ -529,7 +529,6 @@ public class SimpleTcpCluster extends Li > =A0 =A0 =A0 =A0 String clusterName =3D getManagerName(cmanager.getName(),= manager); > =A0 =A0 =A0 =A0 cmanager.setName(clusterName); > =A0 =A0 =A0 =A0 cmanager.setCluster(this); > - =A0 =A0 =A0 =A0cmanager.setDefaultMode(false); > > =A0 =A0 =A0 =A0 managers.put(clusterName, cmanager); > =A0 =A0 =A0 =A0 // Notify our interested LifecycleListeners > > Modified: tomcat/trunk/webapps/docs/config/cluster-manager.xml > URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluste= r-manager.xml?rev=3D980378&r1=3D980377&r2=3D980378&view=3Ddiff > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- tomcat/trunk/webapps/docs/config/cluster-manager.xml (original) > +++ tomcat/trunk/webapps/docs/config/cluster-manager.xml Thu Jul 29 09:45= :32 2010 > @@ -34,89 +34,102 @@ > =A0 > > =A0
> - =A0

> - =A0A cluster manager is an extension to Tomcat's session manager interf= ace, > - =A0org.apache.catalina.Manager > - =A0A cluster manager must implement the org.apache.catalina.ha.Cl= usterManager and is solely > - =A0responsible for how the session is replicated.
> - =A0There are currently two different managers, the org.apache.cat= alina.ha.session.DeltaManager replicates deltas > - =A0of session data to all members in the cluster. This implementation i= s proven and works very well, but has a limitation > - =A0as it requires the cluster members to be homogeneous, all nodes must= deploy the same applications and be exact replicas. > - =A0The org.apache.catalina.ha.session.BackupManager also r= eplicates deltas but only to one backup node. > - =A0The location of the backup node is known to all nodes in the cluster= . It also supports heterogeneous deployments, > - =A0so the manager knows at what locations the webapp is deployed.
> - =A0We are planning to add more managers with even more sophisticated ba= ckup mechanism to support even larger clusters. > - =A0Check back soon! > - =A0

> + =A0

A cluster manager is an extension to Tomcat's session manager int= erface, > + =A0org.apache.catalina.Manager. > + =A0A cluster manager must implement the > + =A0org.apache.catalina.ha.ClusterManager and is solely =A0= responsible > + =A0for how the session is replicated.
> + =A0There are currently two different managers, the > + =A0org.apache.catalina.ha.session.DeltaManager replicates = deltas of > + =A0session data to all members in the cluster. This implementation is p= roven and > + =A0works very well, but has a limitation as it requires the cluster mem= bers to be > + =A0homogeneous, all nodes must deploy the same applications and be exac= t > + =A0replicas. The org.apache.catalina.ha.session.BackupManager also > + =A0replicates deltas but only to one backup node. The location of the b= ackup node > + =A0is known to all nodes in the cluster. It also supports heterogeneous > + =A0deployments, so the manager knows at what locations the web applicat= ion is > + =A0deployed.

> =A0
> > =A0
> - =A0

> - =A0 The <Manager> element defined inside the &= lt;Cluster> element > - =A0 is the template defined for all web applications that are marked <distributable/> > - =A0 in their web.xml file. > - =A0 However, you can still override the manager implementation on a per= web application basis, > - =A0 by putting the <Manager> inside the <Co= ntext> element either in the > - =A0 context.xml file or the <= code>server.xml file. > - =A0

> + =A0

The <Manager> element defined inside the > + =A0<Cluster> element is the template defined for all= web > + =A0applications that are marked <distributable/> in = their > + =A0web.xml file. However, you can still override the manag= er > + =A0implementation on a per web application basis, by putting the > + =A0<Manager> inside the <Context>= element > + =A0either in the context.xml = file or the > + =A0server.xml file.

> =A0
> > =A0
> =A0 > =A0 =A0 > - =A0 =A0 > - =A0 =A0 > - =A0 =A0 > - =A0 =A0 =A0The name of this cluster manager, the name is used to ide= ntify a session manager on a node. > - =A0 =A0 =A0The name might get modified by the Cluster elem= ent to make it unique in the container. > - =A0 =A0 > - =A0 =A0 > - =A0 =A0 =A0Deprecated since 6.0.0 > - =A0 =A0 > - =A0 =A0 > - =A0 =A0 =A0 Set to true if you wish to have session listen= ers notified when > - =A0 =A0 =A0 session attributes are being replicated or removed across T= omcat nodes in the cluster. > - =A0 =A0 > - =A0 =A0 > - =A0 =A0 =A0 When a webapplication is being shutdown, Tomcat issues an e= xpire call to each session to > - =A0 =A0 =A0 notify all the listeners. If you wish for all sessions to e= xpire on all nodes when > - =A0 =A0 =A0 a shutdown occurs on one node, set this value to true= . > - =A0 =A0 =A0 Default value is false. > - =A0 =A0 > - > + =A0 =A0 =A0 > + =A0 =A0 =A0 > + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0The name of this cluster manager, the name is used to= identify a > + =A0 =A0 =A0 =A0session manager on a node. The name might get modified b= y the > + =A0 =A0 =A0 =A0Cluster element to make it unique in the co= ntainer. > + =A0 =A0 =A0 > + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0Set to true if you wish to have session lis= teners notified > + =A0 =A0 =A0 =A0when session attributes are being replicated or removed = across Tomcat > + =A0 =A0 =A0 =A0nodes in the cluster. > + =A0 =A0 =A0 > + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0When a web application is being shutdown, Tomcat issues = an expire call > + =A0 =A0 =A0 =A0to each session to notify all the listeners. If you wish= for all > + =A0 =A0 =A0 =A0sessions to expire on all nodes when a shutdown occurs o= n one node, set > + =A0 =A0 =A0 =A0this value to true. Default value is = false. > + =A0 =A0 =A0 > =A0 =A0 > =A0 > =A0 > =A0 =A0 > - =A0 =A0 > - =A0 =A0 =A0Set to true if you wish sessions to be replicated only to me= mbers that have the same logical > - =A0 =A0 =A0domain set. If set to false, session replication will ignore= the domain setting the > - =A0 =A0 =A0<Membership>= > - =A0 =A0 =A0element. > - =A0 =A0 > - =A0 =A0 > - =A0 =A0 =A0 When a webapplication is being shutdown, Tomcat issues an e= xpire call to each session to > - =A0 =A0 =A0 notify all the listeners. If you wish for all sessions to e= xpire on all nodes when > - =A0 =A0 =A0 a shutdown occurs on one node, set this value to true= . > - =A0 =A0 =A0 Default value is false. > - =A0 =A0 > - =A0 =A0 > - =A0 =A0 =A0 The time in seconds to wait for a session state transfer to= complete from another node > - =A0 =A0 =A0 when a node is starting up. > - =A0 =A0 =A0 Default value is 60 seconds. > - =A0 =A0 > + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0Set to true if you wish sessions to be replicated only t= o members that > + =A0 =A0 =A0 =A0have the same logical domain set. If set to false, sessi= on replication > + =A0 =A0 =A0 =A0will ignore the domain setting the > + =A0 =A0 =A0 =A0<Membership= > > + =A0 =A0 =A0 =A0element. > + =A0 =A0 =A0 > + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0When a web application is being shutdown, Tomcat issues = an expire call > + =A0 =A0 =A0 =A0to each session to notify all the listeners. If you wish= for all > + =A0 =A0 =A0 =A0sessions to expire on all nodes when a shutdown occurs o= n one node, set > + =A0 =A0 =A0 =A0this value to true. > + =A0 =A0 =A0 =A0Default value is false. > + =A0 =A0 =A0 > + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0The maximum number of active sessions that will be creat= ed by this > + =A0 =A0 =A0 =A0Manager, or -1 (the default) for no limit. For this mana= ger, all > + =A0 =A0 =A0 =A0sessions are counted as active sessions irrespective if = whether or not > + =A0 =A0 =A0 =A0the current node is the primary node for the session. > + =A0 =A0 =A0 > + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0The time in seconds to wait for a session state transfer= to complete > + =A0 =A0 =A0 =A0from another node when a node is starting up. > + =A0 =A0 =A0 =A0Default value is 60 seconds. > + =A0 =A0 =A0 > =A0 =A0 > =A0 > =A0 > =A0 =A0 > - =A0 =A0 > - =A0 =A0 =A0 The backup manager uses a replicated map, this map is sendi= ng and > - =A0 =A0 =A0 receiving messages. You can setup the flag for how this map= is sending > - =A0 =A0 =A0 messages, the default value is 6(synchronous).=
> - =A0 =A0 =A0 Note that if you use asynchronous messaging it is possible = for update > - =A0 =A0 =A0 messages for a session to be processed by the receiving nod= e in a > - =A0 =A0 =A0 different order to the order in which they were sent. > - =A0 =A0
> + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0The backup manager uses a replicated map, this map is se= nding and > + =A0 =A0 =A0 =A0receiving messages. You can setup the flag for how this = map is sending > + =A0 =A0 =A0 =A0messages, the default value is 6(synchronou= s).
> + =A0 =A0 =A0 =A0Note that if you use asynchronous messaging it is possib= le for update > + =A0 =A0 =A0 =A0messages for a session to be processed by the receiving = node in a > + =A0 =A0 =A0 =A0different order to the order in which they were sent. > + =A0 =A0 =A0
> + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0The maximum number of active sessions that will be creat= ed by this > + =A0 =A0 =A0 =A0Manager, or -1 (the default) for no limit. For this mana= ger, only > + =A0 =A0 =A0 =A0sessions where the current node is the primary node for = the session are > + =A0 =A0 =A0 =A0considered active sessions. > + =A0 =A0 =A0 > =A0 =A0
> =A0
> =A0
> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > > --=20 Keiichi.Fujino --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org