You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kf...@apache.org on 2016/04/19 10:42:17 UTC

svn commit: r1739865 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java java/org/apache/catalina/tribes/group/GroupChannel.java webapps/docs/changelog.xml

Author: kfujino
Date: Tue Apr 19 08:42:17 2016
New Revision: 1739865

URL: http://svn.apache.org/viewvc?rev=1739865&view=rev
Log:
Add name to channel in order to identify channels.
In tomcat cluster environment, it is set the cluster name + "-Channel" as default value. 

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=1739865&r1=1739864&r2=1739865&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Tue Apr 19 08:42:17 2016
@@ -684,6 +684,8 @@ public class SimpleTcpCluster extends Li
             registerClusterValve();
             channel.addMembershipListener(this);
             channel.addChannelListener(this);
+            if (channel instanceof GroupChannel)
+                ((GroupChannel)channel).setName(getClusterName() + "-Channel");
             channel.start(channelStartOptions);
             if (clusterDeployer != null) clusterDeployer.start();
             registerMember(channel.getLocalMember(false));

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=1739865&r1=1739864&r2=1739865&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Tue Apr 19 08:42:17 2016
@@ -105,6 +105,11 @@ public class GroupChannel extends Channe
     protected boolean optionCheck = false;
 
     /**
+     * the name of this channel.
+     */
+    protected String name = null;
+
+    /**
      * Creates a GroupChannel. This constructor will also
      * add the first interceptor in the GroupChannel.<br>
      * The first interceptor is always the channel itself.
@@ -616,6 +621,14 @@ public class GroupChannel extends Channe
         return heartbeatSleeptime;
     }
 
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
     /**
      *
      * <p>Title: Interceptor Iterator</p>

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1739865&r1=1739864&r2=1739865&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Apr 19 08:42:17 2016
@@ -117,6 +117,11 @@
         Add get/set method for the channel that is related to each Channel
         services. (kfujino)
       </add>
+      <add>
+        Add name to channel in order to identify channels. In tomcat cluster
+        environment, it is set the cluster name + "-Channel" as default value.
+        (kfujino)
+      </add>
     </changelog>
   </subsection>
   <subsection name="Other">



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