activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r384001 - in /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport: TransportThreadSupport.java failover/FailoverTransport.java
Date Tue, 07 Mar 2006 20:33:04 GMT
Author: chirino
Date: Tue Mar  7 12:33:02 2006
New Revision: 384001

URL: http://svn.apache.org/viewcvs?rev=384001&view=rev
Log:
Fixed transport testcase so that it does not fail anymore.  tcp transport was being stopped
and then oneway was being called on it, and it was throwing an unexpected illegalstate exception
witched to ioexception and all was better.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java?rev=384001&r1=384000&r2=384001&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Tue Mar  7 12:33:02 2006
@@ -83,11 +83,11 @@
 
     protected abstract void doStop(ServiceStopper stopper) throws Exception;
 
-    protected void checkStarted(Command command) {
+    protected void checkStarted(Command command) throws IOException {
         if (!isStarted()) {
             // we might try to shut down the transport before it was ever started in some
test cases
             if (!(command instanceof ShutdownInfo)) {
-                throw new IllegalStateException("The transport " + this + " of type: " +
getClass().getName() + " has not been started yet!");
+                throw new IOException("The transport " + this + " of type: " + getClass().getName()
+ " is not running.");
             }
         }
     }

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?rev=384001&r1=384000&r2=384001&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Tue Mar  7 12:33:02 2006
@@ -239,6 +239,7 @@
 
             if (connectedTransport != null) {
                 connectedTransport.stop();
+                connectedTransport=null;
             }
             reconnectMutex.notifyAll();
         }



Mime
View raw message