Author: kfujino Date: Tue Apr 19 08:39:47 2016 New Revision: 1739864 URL: http://svn.apache.org/viewvc?rev=1739864&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/tc8.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=1739864&r1=1739863&r2=1739864&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Tue Apr 19 08:39:47 2016 @@ -538,6 +538,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/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=1739864&r1=1739863&r2=1739864&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java (original) +++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Tue Apr 19 08:39:47 2016 @@ -107,6 +107,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. @@ -623,6 +628,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/tc8.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1739864&r1=1739863&r2=1739864&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Tue Apr 19 08:39:47 2016 @@ -220,6 +220,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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org