tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1738724 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/tribes/group/ChannelCoordinator.java webapps/docs/changelog.xml
Date Tue, 12 Apr 2016 07:56:11 GMT
Author: kfujino
Date: Tue Apr 12 07:56:11 2016
New Revision: 1738724

URL: http://svn.apache.org/viewvc?rev=1738724&view=rev
Log:
As with the multicast cluster environment, in the static cluster environment, the local member
inherits properties from the cluster receiver.

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java?rev=1738724&r1=1738723&r2=1738724&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java Tue
Apr 12 07:56:11 2016
@@ -26,6 +26,7 @@ import org.apache.catalina.tribes.Member
 import org.apache.catalina.tribes.MessageListener;
 import org.apache.catalina.tribes.UniqueId;
 import org.apache.catalina.tribes.membership.McastService;
+import org.apache.catalina.tribes.membership.StaticMember;
 import org.apache.catalina.tribes.transport.ReplicationTransmitter;
 import org.apache.catalina.tribes.transport.SenderState;
 import org.apache.catalina.tribes.transport.nio.NioReceiver;
@@ -143,10 +144,21 @@ public class ChannelCoordinator extends
                 clusterReceiver.setMessageListener(this);
                 clusterReceiver.start();
                 //synchronize, big time FIXME
-                membershipService.setLocalMemberProperties(getClusterReceiver().getHost(),

-                                                           getClusterReceiver().getPort(),
-                                                           getClusterReceiver().getSecurePort(),
-                                                           getClusterReceiver().getUdpPort());
+                Member localMember = getChannel().getLocalMember(false);
+                if (localMember instanceof StaticMember) {
+                    // static member
+                    StaticMember staticMember = (StaticMember)localMember;
+                    staticMember.setHost(getClusterReceiver().getHost());
+                    staticMember.setPort(getClusterReceiver().getPort());
+                    staticMember.setSecurePort(getClusterReceiver().getSecurePort());
+                } else {
+                    // multicast member
+                    membershipService.setLocalMemberProperties(getClusterReceiver().getHost(),
+                            getClusterReceiver().getPort(),
+                            getClusterReceiver().getSecurePort(),
+                            getClusterReceiver().getUdpPort());
+                   
+                }
                 valid = true;
             }
             if ( Channel.SND_TX_SEQ==(svc & Channel.SND_TX_SEQ) ) {

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=1738724&r1=1738723&r2=1738724&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Apr 12 07:56:11 2016
@@ -76,6 +76,11 @@
         Add get/set method for the channel that is related to
         <code>ChannelInterceptorBase</code>. (kfujino)
       </add>
+      <fix>
+        As with the multicast cluster environment, in the static cluster
+        environment, the local member inherits properties from the cluster
+        receiver. (kfujino)
+      </fix>
     </changelog>
   </subsection>
 </section>



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


Mime
View raw message