axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r660876 - /webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java
Date Wed, 28 May 2008 09:30:05 GMT
Author: azeez
Date: Wed May 28 02:30:05 2008
New Revision: 660876

URL: http://svn.apache.org/viewvc?rev=660876&view=rev
Log:
We will wait for a few seconds for WKA members to initialize by receiving MEMBER_LIST messages
from others (if the WKA member crashes and comes alive again)

Modified:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java?rev=660876&r1=660875&r2=660876&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesClusterManager.java
Wed May 28 02:30:05 2008
@@ -149,7 +149,7 @@
         TribesMembershipListener membershipListener = new TribesMembershipListener(membershipManager);
         channel.addMembershipListener(membershipListener);
         try {
-            channel.start(Channel.DEFAULT);
+            channel.start(Channel.DEFAULT); // At this point, this member joins the group
             String localHost = TribesUtil.getLocalHost(channel);
             if (localHost.startsWith("127.0.")) {
                 channel.stop(Channel.DEFAULT);
@@ -180,6 +180,10 @@
             && membershipManager.getMembers().length > 0) {
             log.info("Sending JOIN message to WKA members...");
             Member[] wkaMembers = membershipManager.getMembers(); // The well-known members
+            try {
+                Thread.sleep(3000); // Wait for sometime so that the WKA members can receive
the MEMBER_LIST message, if they have just joined the group
+            } catch (InterruptedException ignored) {
+            }
             Response[] responses = null;
             do {
                 try {



Mime
View raw message