activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r561180 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: broker/TransportConnection.java transport/vm/VMTransport.java
Date Mon, 30 Jul 2007 23:11:25 GMT
Author: chirino
Date: Mon Jul 30 16:11:24 2007
New Revision: 561180

URL: http://svn.apache.org/viewvc?view=rev&rev=561180
Log:
- Faster VMTransport shutdown by avoiding a potential deadlock
- Better connection shutdown.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
    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/broker/TransportConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?view=diff&rev=561180&r1=561179&r2=561180
==============================================================================
--- 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
Mon Jul 30 16:11:24 2007
@@ -930,6 +930,7 @@
 		    // from the broker.
 		    
 		    if (!broker.isStopped()) {
+		    	connectionStates=listConnectionStates();
 				for (TransportConnectionState cs : connectionStates) {
 					cs.getContext().getStopping().set(true);
 					try {

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?view=diff&rev=561180&r1=561179&r2=561180
==============================================================================
--- 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
Mon Jul 30 16:11:24 2007
@@ -168,16 +168,20 @@
     }
 
     public void stop() throws Exception{
+    	TaskRunner tr=null;
     	synchronized(mutex) {
             if(!disposed){
     	        started=false;
                 disposed=true;
                 if(taskRunner!=null){
-                    taskRunner.shutdown(1000);
+                	tr = taskRunner;
                     taskRunner=null;
                 }
             }
         }
+    	if( tr !=null ) {
+    		tr.shutdown(1000);
+    	}
     }
 
     public Object narrow(Class target){



Mime
View raw message