Author: kfujino Date: Tue Apr 19 08:34:45 2016 New Revision: 1739862 URL: http://svn.apache.org/viewvc?rev=1739862&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/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java tomcat/trunk/java/org/apache/catalina/tribes/Channel.java tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java tomcat/trunk/webapps/docs/changelog.xml 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=1739862&r1=1739861&r2=1739862&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Tue Apr 19 08:34:45 2016 @@ -533,6 +533,7 @@ public class SimpleTcpCluster extends Li registerClusterValve(); channel.addMembershipListener(this); channel.addChannelListener(this); + channel.setName(getClusterName() + "-Channel"); channel.start(channelStartOptions); if (clusterDeployer != null) clusterDeployer.start(); registerMember(channel.getLocalMember(false)); Modified: tomcat/trunk/java/org/apache/catalina/tribes/Channel.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/Channel.java?rev=1739862&r1=1739861&r2=1739862&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/tribes/Channel.java (original) +++ tomcat/trunk/java/org/apache/catalina/tribes/Channel.java Tue Apr 19 08:34:45 2016 @@ -357,5 +357,16 @@ public interface Channel { */ public Member getMember(Member mbr); + /** + * Return the name of this channel. + * @return channel name + */ + public String getName(); + + /** + * Set the name of this channel + * @param name + */ + public void setName(String name); } Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=1739862&r1=1739861&r2=1739862&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java (original) +++ tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Tue Apr 19 08:34:45 2016 @@ -106,6 +106,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. @@ -621,6 +626,16 @@ public class GroupChannel extends Channe return heartbeatSleeptime; } + @Override + public String getName() { + return name; + } + + @Override + public void setName(String name) { + this.name = name; + } + /** * * <p>Title: Interceptor Iterator</p> Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1739862&r1=1739861&r2=1739862&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Apr 19 08:34:45 2016 @@ -265,6 +265,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