tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r463510 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/ha/ java/org/apache/catalina/ha/session/ java/org/apache/catalina/ha/tcp/ webapps/docs/config/
Date Thu, 12 Oct 2006 23:21:22 GMT
Author: fhanik
Date: Thu Oct 12 16:21:21 2006
New Revision: 463510

URL: http://svn.apache.org/viewvc?view=rev&rev=463510
Log:
Document more manager options, far from complete

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/ClusterManager.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/BackupManager.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java
    tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-manager.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/ClusterManager.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/ClusterManager.java?view=diff&rev=463510&r1=463509&r2=463510
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/ClusterManager.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/ClusterManager.java Thu Oct 12 16:21:21
2006
@@ -82,13 +82,13 @@
     * @return Manager send only to same cluster domain.
     * @since 5.5.10
     */
-   public boolean isSendClusterDomainOnly();
+   public boolean doDomainReplication();
 
    /**
     * @param sendClusterDomainOnly Flag value.
     * @since 5.5.10
     */
-   public void setSendClusterDomainOnly(boolean sendClusterDomainOnly);
+   public void setDomainReplication(boolean domainReplication);
 
    /**
     * @param mode The mode

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/BackupManager.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/BackupManager.java?view=diff&rev=463510&r1=463509&r2=463510
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/BackupManager.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/BackupManager.java Thu Oct 12
16:21:21 2006
@@ -76,14 +76,14 @@
     public void messageDataReceived(ClusterMessage msg) {
     }
 
-    public boolean isSendClusterDomainOnly() {
+    public boolean doDomainReplication() {
         return false;
     }
 
     /**
      * @param sendClusterDomainOnly The sendClusterDomainOnly to set.
      */
-    public void setSendClusterDomainOnly(boolean sendClusterDomainOnly) {
+    public void setDomainReplication(boolean sendClusterDomainOnly) {
     }
 
     /**

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?view=diff&rev=463510&r1=463509&r2=463510
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Thu Oct 12
16:21:21 2006
@@ -358,14 +358,14 @@
     /**
      * @return Returns the sendClusterDomainOnly.
      */
-    public boolean isSendClusterDomainOnly() {
+    public boolean doDomainReplication() {
         return sendClusterDomainOnly;
     }
     
     /**
      * @param sendClusterDomainOnly The sendClusterDomainOnly to set.
      */
-    public void setSendClusterDomainOnly(boolean sendClusterDomainOnly) {
+    public void setDomainReplication(boolean sendClusterDomainOnly) {
         this.sendClusterDomainOnly = sendClusterDomainOnly;
     }
 
@@ -581,7 +581,7 @@
      */
     protected void send(SessionMessage msg) {
         if(cluster != null) {
-            if(isSendClusterDomainOnly())
+            if(doDomainReplication())
                 cluster.sendClusterDomain(msg);
             else
                 cluster.send(msg);
@@ -1280,7 +1280,7 @@
      *            requesting node
      */
     protected void messageReceived(SessionMessage msg, Member sender) {
-        if(isSendClusterDomainOnly() && !checkSenderDomain(msg,sender)) {
+        if(doDomainReplication() && !checkSenderDomain(msg,sender)) {
             return;
         }
         ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java?view=diff&rev=463510&r1=463509&r2=463510
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java Thu
Oct 12 16:21:21 2006
@@ -386,7 +386,7 @@
         Context context = request.getContext();
         msg.setContextPath(context.getPath());
         msg.setHost(context.getParent().getName());
-        if(manager.isSendClusterDomainOnly())
+        if(manager.doDomainReplication())
             cluster.sendClusterDomain(msg);
         else
             cluster.send(msg);

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java?view=diff&rev=463510&r1=463509&r2=463510
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java
Thu Oct 12 16:21:21 2006
@@ -112,14 +112,14 @@
         super();
     }
 
-    public boolean isSendClusterDomainOnly() {
+    public boolean doDomainReplication() {
         return sendClusterDomainOnly;
     }
     
     /**
      * @param sendClusterDomainOnly The sendClusterDomainOnly to set.
      */
-    public void setSendClusterDomainOnly(boolean sendClusterDomainOnly) {
+    public void setDomainReplication(boolean sendClusterDomainOnly) {
         this.sendClusterDomainOnly = sendClusterDomainOnly;
     }
   

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java?view=diff&rev=463510&r1=463509&r2=463510
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java Thu Oct 12
16:21:21 2006
@@ -546,7 +546,7 @@
     protected void send(ClusterManager manager, CatalinaCluster cluster, String sessionId)
{
         ClusterMessage msg = manager.requestCompleted(sessionId);
         if (msg != null) {
-            if(manager.isSendClusterDomainOnly()) {
+            if(manager.doDomainReplication()) {
                 cluster.sendClusterDomain(msg);
             } else {
                 cluster.send(msg);

Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-manager.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-manager.xml?view=diff&rev=463510&r1=463509&r2=463510
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-manager.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/cluster-manager.xml Thu Oct 12 16:21:21 2006
@@ -15,8 +15,18 @@
 
 
 <section name="Introduction">
-
-  
+  A cluster manager is an extension to Tomcat's session manager interface, 
+  <code>org.apache.catalina.Manager</code>
+  A cluster manager must implement the <code>org.apache.catalina.ha.ClusterManager</code>
and is solely 
+  responsible for how the session is replicated.<br/>
+  There are currently two different managers, the <code>org.apache.catalina.ha.session.DeltaManager</code>
replicates deltas 
+  of session data to all members in the cluster. This implementation is proven and works
very well, but has a limitation
+  as it requires the cluster members to be homogeneous, all nodes must deploy the same applications
and be exact replicas.
+  The <code>org.apache.catalina.ha.session.BackupManager</code> also replicates
deltas but only to one backup node.
+  The location of the backup node is known to all nodes in the cluster. It also supports
heterogeneous deployments,
+  so the manager knows at what locations the webapp is deployed.<br/>
+  We are planning to add more managers with even more sophisticated backup mechanism to support
even larger clusters.
+  Check back soon! 
 
 </section>
 
@@ -29,6 +39,21 @@
  
     <attribute name="className" required="true">
 
+    </attribute>
+    <attribute name="domainReplication" required="false">
+      Set to true if you wish sessions to be replicated only to members that have the same
logical
+      domain set. If set to false, session replication will ignore the domain setting the

+      <code><a href="cluster-membership.html">&lt;Membership&gt;</a></code>
+      element.
+    </attribute>
+    <attribute name="defaultMode" required="false">
+      <b>Deprecated since 6.0.0</b>
+    </attribute>
+    <attribute name="expireSessionsOnShutdown" required="false">
+      
+    </attribute>
+    <attribute name="notifyListenersOnReplication" required="false">
+    
     </attribute>
 
 



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


Mime
View raw message