activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r638969 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Date Wed, 19 Mar 2008 18:45:13 GMT
Author: chirino
Date: Wed Mar 19 11:45:08 2008
New Revision: 638969

URL: http://svn.apache.org/viewvc?rev=638969&view=rev
Log:
allow blocked connections to unblock so we can get in and stop them.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?rev=638969&r1=638968&r2=638969&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Wed Mar 19 11:45:08 2008
@@ -892,6 +892,14 @@
             }
         }
         if (stopping.compareAndSet(false, true)) {
+            
+            // Let all the connection contexts know we are shutting down
+            // so that in progress operations can notice and unblock.
+            List<TransportConnectionState> connectionStates = listConnectionStates();
+            for (TransportConnectionState cs : connectionStates) {
+                cs.getContext().getStopping().set(true);
+            }
+
             new Thread("ActiveMQ Transport Stopper: "+ transport.getRemoteAddress()) {
                 @Override
                 public void run() {
@@ -931,13 +939,6 @@
             LOG.trace("Exception caught stopping", ignore);
         }
 
-        // Let all the connection contexts know we are shutting down
-        // so that in progress operations can notice and unblock.
-        List<TransportConnectionState> connectionStates = listConnectionStates();
-        for (TransportConnectionState cs : connectionStates) {
-            cs.getContext().getStopping().set(true);
-        }
-
         try {
             transport.stop();
             LOG.debug("Stopped connection: " + transport.getRemoteAddress());
@@ -975,6 +976,8 @@
         // from the broker.
 
         if (!broker.isStopped()) {
+            
+            List<TransportConnectionState> connectionStates = listConnectionStates();
             connectionStates = listConnectionStates();
             for (TransportConnectionState cs : connectionStates) {
                 cs.getContext().getStopping().set(true);



Mime
View raw message