activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r511090 - in /activemq/branches/activemq-4.1: ./ activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Date Fri, 23 Feb 2007 20:25:43 GMT
Author: chirino
Date: Fri Feb 23 12:25:42 2007
New Revision: 511090

URL: http://svn.apache.org/viewvc?view=rev&rev=511090
Log:
 r246@34:  chirino | 2007-02-23 14:49:53 -0500
 Avoid hanging connection if dispatch fails when shutdowninfo is sent
 
 

Modified:
    activemq/branches/activemq-4.1/   (props changed)
    activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
    activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java

Propchange: activemq/branches/activemq-4.1/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Feb 23 12:25:42 2007
@@ -1 +1 @@
-635f1f41-eb29-0410-ac9d-be9e2c357fdd:/local/amq-4.1-port:245
+635f1f41-eb29-0410-ac9d-be9e2c357fdd:/local/amq-4.1-port:246

Modified: activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java?view=diff&rev=511090&r1=511089&r2=511090
==============================================================================
--- activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
(original)
+++ activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
Fri Feb 23 12:25:42 2007
@@ -583,8 +583,6 @@
     public void dispose() throws JMSException {
         if (!unconsumedMessages.isClosed()) {
         	
-        	//log.warn("Consumer is being disposed.", new Exception("trace exception."));
-        	
             // Do we have any acks we need to send out before closing?
             // Ack any delivered messages now. (session may still
             // commit/rollback the acks).

Modified: activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?view=diff&rev=511090&r1=511089&r2=511090
==============================================================================
--- activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
(original)
+++ activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Fri Feb 23 12:25:42 2007
@@ -826,7 +826,10 @@
            if( disposed.get() ) {
                 if( dispatchStopped.compareAndSet(false, true)) {                       
                                     
                     if( transportException.get()==null ) {
-                        dispatch(new ShutdownInfo());
+                        try {
+                            dispatch(new ShutdownInfo());
+                        } catch (Throwable ignore) {
+                        }
                     }
                     dispatchStoppedLatch.countDown();
                 }
@@ -930,11 +933,12 @@
                 }
 
 
-                taskRunner.wakeup();
-                dispatchStoppedLatch.await();
 
-		        if( taskRunner!=null )
+		        if( taskRunner!=null ) {
+                    taskRunner.wakeup();
+                    dispatchStoppedLatch.await();
 		            taskRunner.shutdown();
+                }
 		        
                 // Run the MessageDispatch callbacks so that message references get cleaned
up.
                 for (Iterator iter = dispatchQueue.iterator(); iter.hasNext();) {



Mime
View raw message