ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r610037 - in /webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering: ClusteringUtils.java tribes/MembershipManager.java tribes/TribesClusterManager.java
Date Tue, 08 Jan 2008 16:11:50 GMT
Author: azeez
Date: Tue Jan  8 08:11:48 2008
New Revision: 610037

URL: http://svn.apache.org/viewvc?rev=610037&view=rev
Log:
1. Renamed longestAliveMember -> longestLivingMember
2. If a particular service AAR is not found, throw a FileNotFoundException


Modified:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/ClusteringUtils.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java
    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/ClusteringUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/ClusteringUtils.java?rev=610037&r1=610036&r2=610037&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/ClusteringUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/ClusteringUtils.java
Tue Jan  8 08:11:48 2008
@@ -25,6 +25,7 @@
 import javax.activation.DataHandler;
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.FileNotFoundException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.Random;
@@ -63,6 +64,9 @@
         } else {
             serviceArchive = new File(axis2Repo + File.separator + "services" +
                                       File.separator + serviceGroupName);
+        }
+        if(!serviceArchive.exists()){
+            throw new FileNotFoundException("File " + serviceArchive + " not found");
         }
         AxisServiceGroup asGroup =
                 DeploymentEngine.loadServiceGroup(serviceArchive, configCtx);

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java?rev=610037&r1=610036&r2=610037&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java
Tue Jan  8 08:11:48 2008
@@ -39,21 +39,21 @@
         return (Member[]) members.toArray(new Member[members.size()]);
     }
 
-    public synchronized static Member getLongestAliveMember() {
-        Member longestAliveMember = null;
+    public synchronized static Member getLongestLivingMember() {
+        Member longestLivingMember = null;
         if (members.size() > 0) {
             Member member0 = (Member) members.get(0);
             long longestAliveTime = member0.getMemberAliveTime();
-            longestAliveMember = member0;
+            longestLivingMember = member0;
             for (int i = 0; i < members.size(); i++) {
                 Member member = (Member) members.get(i);
                 if (longestAliveTime < member.getMemberAliveTime()) {
                     longestAliveTime = member.getMemberAliveTime();
-                    longestAliveMember = member;
+                    longestLivingMember = member;
                 }
             }
         }
-        return longestAliveMember;
+        return longestLivingMember;
     }
 
     public synchronized static Member getRandomMember() {

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=610037&r1=610036&r2=610037&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
Tue Jan  8 08:11:48 2008
@@ -244,7 +244,7 @@
             // While there are members and GetStateResponseCommand is not received do the
following
             try {
                 Member member = (numberOfTries == 0) ?
-                                MembershipManager.getLongestAliveMember() : // First try
to get from the longest alive member
+                                MembershipManager.getLongestLivingMember() : // First try
to get from the longest alive member
                                 MembershipManager.getRandomMember(); // Else get from a random
member
                 if (!sentMembersList.contains(TribesUtil.getHost(member))) {
                     long tts = sender.sendToMember(command, member);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message