activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r803907 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
Date Thu, 13 Aug 2009 14:47:48 GMT
Author: dejanb
Date: Thu Aug 13 14:47:48 2009
New Revision: 803907

URL: http://svn.apache.org/viewvc?rev=803907&view=rev
Log:
improvement for https://issues.apache.org/activemq/browse/AMQ-1936 - improve vm transport
stopping performances

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java?rev=803907&r1=803906&r2=803907&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
Thu Aug 13 14:47:48 2009
@@ -32,6 +32,8 @@
 import org.apache.activemq.transport.TransportDisposedIOException;
 import org.apache.activemq.transport.TransportListener;
 import org.apache.activemq.util.IOExceptionSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 
 /**
@@ -143,12 +145,6 @@
         
         // If stop() is called while being start()ed.. then we can't stop until we return
to the start() method.
         if( enqueueValve.isOn() ) {
-            
-            // let the peer know that we are disconnecting..
-            try {
-                oneway(DISCONNECT);
-            } catch (Exception ignore) {
-            }
 
             TaskRunner tr = null;
             try {
@@ -168,6 +164,11 @@
             if (tr != null) {
                 tr.shutdown(1000);
             }
+            // let the peer know that we are disconnecting..
+            try {
+                oneway(DISCONNECT);
+            } catch (Exception ignore) {
+            }
         }
     }
     



Mime
View raw message