activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r384189 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Date Wed, 08 Mar 2006 11:47:12 GMT
Author: jstrachan
Date: Wed Mar  8 03:47:09 2006
New Revision: 384189

URL: http://svn.apache.org/viewcvs?rev=384189&view=rev
Log:
allow the transport to be closed before we try and send remove commands to it without generating
an exception

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.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=384189&r1=384188&r2=384189&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
Wed Mar  8 03:47:09 2006
@@ -17,6 +17,7 @@
 package org.apache.activemq.transport;
 
 import org.apache.activemq.command.Command;
+import org.apache.activemq.command.RemoveInfo;
 import org.apache.activemq.command.ShutdownInfo;
 import org.apache.activemq.util.ServiceStopper;
 
@@ -86,7 +87,7 @@
     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)) {
+            if (!(command instanceof ShutdownInfo || command instanceof RemoveInfo)) {
                 throw new IOException("The transport " + this + " of type: " + getClass().getName()
+ " is not running.");
             }
         }



Mime
View raw message