activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r418156 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport: FutureResponse.java ResponseCorrelator.java
Date Fri, 30 Jun 2006 00:13:26 GMT
Author: chirino
Date: Thu Jun 29 17:13:25 2006
New Revision: 418156

URL: http://svn.apache.org/viewvc?rev=418156&view=rev
Log:
Eliminated an unneed Thread.currentThread().interrupt();

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java?rev=418156&r1=418155&r2=418156&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/FutureResponse.java
Thu Jun 29 17:13:25 2006
@@ -57,7 +57,7 @@
         }
     }
     
-    public void set(Response result) throws InterruptedIOException {
+    public void set(Response result) {
         if( responseSlot.offer(result) ) {
             if( responseCallback !=null ) {
                 responseCallback.onCompletion(this);

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java?rev=418156&r1=418155&r2=418156&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/ResponseCorrelator.java
Thu Jun 29 17:13:25 2006
@@ -17,9 +17,7 @@
 package org.apache.activemq.transport;
 
 import java.io.IOException;
-import java.io.InterruptedIOException;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.Iterator;
 
 import org.apache.activemq.command.Command;
@@ -82,16 +80,12 @@
     public void onCommand(Command command) {
         boolean debug = log.isDebugEnabled();
         if( command.isResponse() ) {
-            try {
-                Response response = (Response) command;
-                FutureResponse future = (FutureResponse) requestMap.remove(new Integer(response.getCorrelationId()));
-                if( future!=null ) {
-                    future.set(response);
-                } else {
-                    if( debug ) log.debug("Received unexpected response for command id: "+response.getCorrelationId());
-                }
-            } catch (InterruptedIOException e) {
-                onException(e);
+            Response response = (Response) command;
+            FutureResponse future = (FutureResponse) requestMap.remove(new Integer(response.getCorrelationId()));
+            if( future!=null ) {
+                future.set(response);
+            } else {
+                if( debug ) log.debug("Received unexpected response for command id: "+response.getCorrelationId());
             }
         } else {
             getTransportListener().onCommand(command);
@@ -109,12 +103,8 @@
         requestMap.clear();
         
         for (Iterator iter = requests.iterator(); iter.hasNext();) {
-            try {
-                FutureResponse fr = (FutureResponse) iter.next();
-                fr.set(new ExceptionResponse(error));
-            } catch (InterruptedIOException e) {
-                Thread.currentThread().interrupt();
-            }
+            FutureResponse fr = (FutureResponse) iter.next();
+            fr.set(new ExceptionResponse(error));
         }
         
         super.onException(error);



Mime
View raw message