activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [1/2] activemq-artemis git commit: NO-JIRA properly destroy JMS topic
Date Fri, 16 Dec 2016 13:45:14 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 5539c27b4 -> 749db2596


NO-JIRA properly destroy JMS topic


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/31b5bdb0
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/31b5bdb0
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/31b5bdb0

Branch: refs/heads/master
Commit: 31b5bdb026c6e5c88496edf42dc8c39ff4c94ed3
Parents: 5539c27
Author: jbertram <jbertram@apache.org>
Authored: Thu Dec 15 22:58:22 2016 -0600
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Fri Dec 16 13:20:39 2016 +0000

----------------------------------------------------------------------
 .../artemis/jms/server/impl/JMSServerManagerImpl.java        | 8 +++++++-
 .../artemis/core/postoffice/impl/PostOfficeImpl.java         | 3 ---
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31b5bdb0/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 6daf9fb..c9c07ef 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -39,6 +39,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import org.apache.activemq.artemis.api.core.ActiveMQAddressDoesNotExistException;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -814,11 +815,16 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
 
             // We can't remove the remote binding. As this would be the bridge associated
with the topic on this case
             if (binding.getType() != BindingType.REMOTE_QUEUE) {
-               server.destroyQueue(SimpleString.toSimpleString(queueName), null, !removeConsumers,
removeConsumers);
+               server.destroyQueue(SimpleString.toSimpleString(queueName), null, !removeConsumers,
removeConsumers, true);
             }
          }
 
          if (addressControl.getQueueNames().length == 0) {
+            try {
+               server.removeAddressInfo(SimpleString.toSimpleString(name), null);
+            } catch (ActiveMQAddressDoesNotExistException e) {
+               // ignore
+            }
             removeFromBindings(topics, topicBindings, name);
 
             topics.remove(name);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/31b5bdb0/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index 4103a82..60a6ffa 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -589,12 +589,9 @@ public class PostOfficeImpl implements PostOffice, NotificationListener,
Binding
          throw new ActiveMQNonExistentQueueException();
       }
 
-      // TODO: see whether we still want to do this or not
       if (deleteData && addressManager.getBindingsForRoutingAddress(binding.getAddress())
== null) {
          pagingManager.deletePageStore(binding.getAddress());
 
-         managementService.unregisterAddress(binding.getAddress());
-
          deleteDuplicateCache(binding.getAddress());
       }
 


Mime
View raw message