axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r555891 - in /webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering: configuration/DefaultConfigurationManager.java configuration/commands/ExceptionCommand.java tribes/ChannelListener.java tribes/ChannelSender.java
Date Fri, 13 Jul 2007 06:47:35 GMT
Author: azeez
Date: Thu Jul 12 23:47:34 2007
New Revision: 555891

URL: http://svn.apache.org/viewvc?view=rev&rev=555891
Log:
Few more fixes to handing exceptions sent from one node to another.


Modified:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/DefaultConfigurationManager.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/commands/ExceptionCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelListener.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/DefaultConfigurationManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/DefaultConfigurationManager.java?view=diff&rev=555891&r1=555890&r2=555891
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/DefaultConfigurationManager.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/DefaultConfigurationManager.java
Thu Jul 12 23:47:34 2007
@@ -83,7 +83,7 @@
             log.debug("Enter: DefaultConfigurationManager::exceptionOccurred");
         }
 
-        send(throwable);
+        send(new ExceptionCommand(throwable));
 
         if (log.isDebugEnabled()) {
             log.debug("Exit: DefaultConfigurationManager::exceptionOccurred");
@@ -159,7 +159,7 @@
     }
 
     protected void send(Throwable throwable) throws ClusteringFault {
-        sender.sendToGroup(throwable);
+        send(new ExceptionCommand(throwable));
     }
 
     protected void send(ConfigurationClusteringCommand command) throws ClusteringFault {

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/commands/ExceptionCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/commands/ExceptionCommand.java?view=diff&rev=555891&r1=555890&r2=555891
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/commands/ExceptionCommand.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/configuration/commands/ExceptionCommand.java
Thu Jul 12 23:47:34 2007
@@ -27,8 +27,12 @@
 public class ExceptionCommand extends ConfigurationClusteringCommand {
     private Throwable exception;
 
+    public ExceptionCommand(Throwable exception) {
+        this.exception = exception;
+    }
+
     public int getCommandType() {
-        return ConfigurationClusteringCommand.COMMIT;
+        return ConfigurationClusteringCommand.EXCEPTION;
     }
 
     public Throwable getException() {
@@ -56,6 +60,6 @@
     }
 
     public String toString() {
-        return "ExceptionCommand";
+        return "ExceptionCommand["+exception.getClass()+"]: \"" + exception.getMessage()
+ "\"";
     }
 }

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelListener.java?view=diff&rev=555891&r1=555890&r2=555891
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelListener.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelListener.java
Thu Jul 12 23:47:34 2007
@@ -112,8 +112,6 @@
         } else if (msg instanceof ControlCommand && controlCommandProcessor != null)
{
             controlCommandProcessor.process((ControlCommand) msg,
                                             sender);
-        } else if (msg instanceof Throwable){
-            System.err.println("#####----------- Recd exception " + msg);
-        }
+        } 
     }
 }

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java?view=diff&rev=555891&r1=555890&r2=555891
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/ChannelSender.java
Thu Jul 12 23:47:34 2007
@@ -74,34 +74,6 @@
         }
     }
 
-    public long sendToGroup(Throwable throwable) throws ClusteringFault {
-        if (channel == null) {
-            return 0;
-        }
-
-        long timeToSend = 0;
-
-        // Keep retrying, since at the point of trying to send the msg, a member may leave
the group
-        while (true) {
-            if (channel.getMembers().length > 0) {
-                try {
-                    long start = System.currentTimeMillis();
-                    channel.send(channel.getMembers(), throwable, Channel.SEND_OPTIONS_USE_ACK);
-                    timeToSend = System.currentTimeMillis() - start;
-                    log.debug("Sent " + throwable + " to group");
-                    break;
-                } catch (ChannelException e) {
-                    String message = "Error sending exception message : " + throwable +
-                                     ". Reason " + e.getMessage();
-                    log.warn(message);
-                }
-            } else {
-                break;
-            }
-        }
-        return timeToSend;
-    }
-
     public long sendToMember(ClusteringCommand cmd, Member member) throws ClusteringFault
{
         long timeToSend = 0;
         try {



---------------------------------------------------------------------
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