Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 69753 invoked from network); 30 Jul 2010 03:31:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Jul 2010 03:31:58 -0000 Received: (qmail 72256 invoked by uid 500); 30 Jul 2010 03:31:58 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 71686 invoked by uid 500); 30 Jul 2010 03:31:55 -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 71672 invoked by uid 99); 30 Jul 2010 03:31:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jul 2010 03:31:54 +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:31:52 +0000 Received: (qmail 69653 invoked by uid 99); 30 Jul 2010 03:31:32 -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:31:32 +0000 Received: by vws19 with SMTP id 19so849217vws.18 for ; Thu, 29 Jul 2010 20:31:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.61.199 with SMTP id u7mr703851vch.140.1280460690661; Thu, 29 Jul 2010 20:31:30 -0700 (PDT) Received: by 10.220.171.5 with HTTP; Thu, 29 Jul 2010 20:31:30 -0700 (PDT) In-Reply-To: References: <20100729094533.30C202388900@eris.apache.org> Date: Fri, 30 Jul 2010 12:31:30 +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 Sorry. This rev is just remove defaultMode and add maxActiveSessions. domainReplication was not related. I send another proposal mail. --=20 Keiichi.Fujino Fujino : > Hi. > > SimpleTcpCluster#sendClusterDomain called when domainReplication is > true is as follows now. > > =3D=3D=3DSimpleTcpCluster#sendClusterDomain=3D=3D=3D > public void sendClusterDomain(ClusterMessage msg) { > =A0 =A0send(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? > > -- > 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.ja= va >> =A0 =A0tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.jav= a >> =A0 =A0tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.jav= a >> =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/= ha/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 (origin= al) >> +++ 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 of= fset, 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/= ha/session/BackupManager.java?rev=3D980378&r1=3D980377&r2=3D980378&view=3Dd= iff >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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 = Thu 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 expireSessionsOn= Shutdown) >> =A0 =A0 { >> =A0 =A0 =A0 =A0 mExpireSessionsOnShutdown =3D expireSessionsOnShutdown; >> >> Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.= java >> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/= ha/session/DeltaManager.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/DeltaManager.java (= original) >> +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java T= hu 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.= java >> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/= ha/tcp/SimpleTcpCluster.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/tcp/SimpleTcpCluster.java (= original) >> +++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java T= hu 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/clust= er-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:4= 5:32 2010 >> @@ -34,89 +34,102 @@ >> =A0 >> >> =A0
>> - =A0

>> - =A0A cluster manager is an extension to Tomcat's session manager inter= face, >> - =A0org.apache.catalina.Manager >> - =A0A cluster manager must implement the org.apache.catalina.ha.C= lusterManager and is solely >> - =A0responsible for how the session is replicated.
>> - =A0There are currently two different managers, the org.apache.ca= talina.ha.session.DeltaManager replicates deltas >> - =A0of session data to all members in the cluster. This implementation = is proven and works very well, but has a limitation >> - =A0as it requires the cluster members to be homogeneous, all nodes mus= t deploy the same applications and be exact replicas. >> - =A0The org.apache.catalina.ha.session.BackupManager also = replicates deltas but only to one backup node. >> - =A0The location of the backup node is known to all nodes in the cluste= r. 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 b= ackup mechanism to support even larger clusters. >> - =A0Check back soon! >> - =A0

>> + =A0

A cluster manager is an extension to Tomcat's session manager in= terface, >> + =A0org.apache.catalina.Manager. >> + =A0A cluster manager must implement the >> + =A0org.apache.catalina.ha.ClusterManager and is solely = =A0responsible >> + =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 = proven and >> + =A0works very well, but has a limitation as it requires the cluster me= mbers to be >> + =A0homogeneous, all nodes must deploy the same applications and be exa= ct >> + =A0replicas. The org.apache.catalina.ha.session.BackupManager also >> + =A0replicates deltas but only to one backup node. The location of the = backup node >> + =A0is known to all nodes in the cluster. It also supports heterogeneou= s >> + =A0deployments, so the manager knows at what locations the web applica= tion is >> + =A0deployed.

>> =A0
>> >> =A0
>> - =A0

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

>> + =A0

The <Manager> element defined inside the >> + =A0<Cluster> element is the template defined for al= l web >> + =A0applications that are marked <distributable/> in= their >> + =A0web.xml file. However, you can still override the mana= ger >> + =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 id= entify a session manager on a node. >> - =A0 =A0 =A0The name might get modified by the Cluster ele= ment 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 liste= ners notified when >> - =A0 =A0 =A0 session attributes are being replicated or removed across = Tomcat nodes in the cluster. >> - =A0 =A0 >> - =A0 =A0 >> - =A0 =A0 =A0 When a webapplication is being shutdown, Tomcat issues an = expire call to each session to >> - =A0 =A0 =A0 notify all the listeners. If you wish for all sessions to = expire on all nodes when >> - =A0 =A0 =A0 a shutdown occurs on one node, set this value to tru= e. >> - =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 t= o identify a >> + =A0 =A0 =A0 =A0session manager on a node. The name might get modified = by the >> + =A0 =A0 =A0 =A0Cluster element to make it unique in the c= ontainer. >> + =A0 =A0 =A0 >> + =A0 =A0 =A0 >> + =A0 =A0 =A0 =A0Set to true if you wish to have session li= steners 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 wis= h for all >> + =A0 =A0 =A0 =A0sessions to expire on all nodes when a shutdown occurs = on 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 m= embers that have the same logical >> - =A0 =A0 =A0domain set. If set to false, session replication will ignor= e 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 = expire call to each session to >> - =A0 =A0 =A0 notify all the listeners. If you wish for all sessions to = expire on all nodes when >> - =A0 =A0 =A0 a shutdown occurs on one node, set this value to tru= e. >> - =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 t= o 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 = to members that >> + =A0 =A0 =A0 =A0have the same logical domain set. If set to false, sess= ion replication >> + =A0 =A0 =A0 =A0will ignore the domain setting the >> + =A0 =A0 =A0 =A0<Membershi= p> >> + =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 wis= h for all >> + =A0 =A0 =A0 =A0sessions to expire on all nodes when a shutdown occurs = on 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 crea= ted by this >> + =A0 =A0 =A0 =A0Manager, or -1 (the default) for no limit. For this man= ager, 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 transfe= r 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 send= ing and >> - =A0 =A0 =A0 receiving messages. You can setup the flag for how this ma= p 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 no= de 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 s= ending 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(synchrono= us).
>> + =A0 =A0 =A0 =A0Note that if you use asynchronous messaging it is possi= ble 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 crea= ted by this >> + =A0 =A0 =A0 =A0Manager, or -1 (the default) for no limit. For this man= ager, 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 >> >> > > > > -- > Keiichi.Fujino > --=20 Keiichi.Fujino --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org