activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r559015 - /activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java
Date Tue, 24 Jul 2007 11:55:18 GMT
Author: jlim
Date: Tue Jul 24 04:55:17 2007
New Revision: 559015

URL: http://svn.apache.org/viewvc?view=rev&rev=559015
Log:
patch for https://issues.apache.org/activemq/browse/AMQ-1320

Modified:
    activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java

Modified: activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java?view=diff&rev=559015&r1=559014&r2=559015
==============================================================================
--- activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java
(original)
+++ activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java
Tue Jul 24 04:55:17 2007
@@ -27,9 +27,12 @@
 import org.apache.activemq.command.DestinationInfo;
 import org.apache.activemq.command.MessageAck;
 import org.apache.activemq.command.MessageDispatch;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public class AdvisoryConsumer implements ActiveMQDispatcher {
 
+    private static final transient Log log = LogFactory.getLog(AdvisoryConsumer.class);
     private final ActiveMQConnection connection;
     private ConsumerInfo info;
     private boolean closed;
@@ -48,6 +51,11 @@
 
     public void dispose() {
         if (!closed) {
+            try {
+                this.connection.asyncSendPacket(info.createRemoveCommand());
+            } catch (JMSException e) {
+                log.info("Failed to send remove command: " + e, e);
+            }        	
             this.connection.removeDispatcher(info.getConsumerId());
             closed = true;
         }



Mime
View raw message