activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [04/48] activemq-artemis git commit: Fix PersistenceTest
Date Wed, 23 Nov 2016 17:43:05 GMT
Fix PersistenceTest


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

Branch: refs/heads/ARTEMIS-780
Commit: 20a4616e8c3223ce780134b123a12a32b57be21a
Parents: 74a3738
Author: jbertram <jbertram@apache.com>
Authored: Mon Nov 14 13:00:10 2016 -0600
Committer: jbertram <jbertram@apache.com>
Committed: Tue Nov 15 10:36:42 2016 -0600

----------------------------------------------------------------------
 .../artemis/core/postoffice/impl/SimpleAddressManager.java       | 1 -
 .../artemis/core/server/impl/AutoCreatedQueueManagerImpl.java    | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20a4616e/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
index bfdfb8a..6ed2564 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
@@ -29,7 +29,6 @@ import org.apache.activemq.artemis.core.postoffice.Binding;
 import org.apache.activemq.artemis.core.postoffice.Bindings;
 import org.apache.activemq.artemis.core.postoffice.BindingsFactory;
 import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle;
-import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.core.transaction.Transaction;
 import org.jboss.logging.Logger;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20a4616e/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
index 55fb765..a211a96 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
@@ -33,14 +33,14 @@ public class AutoCreatedQueueManagerImpl implements AutoCreatedQueueManager
{
    private final Runnable runnable = new Runnable() {
       @Override
       public void run() {
-         // TODO check auto created and deleteOnNoConsumers
          Queue queue = server.locateQueue(queueName);
          SimpleString address = queue.getAddress();
          AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString());
          long consumerCount = queue.getConsumerCount();
          long messageCount = queue.getMessageCount();
 
-         if (queue.getMessageCount() == 0) {
+         // TODO make sure this is the right check
+         if ((queue.isAutoCreated() || queue.isDeleteOnNoConsumers()) && queue.getMessageCount()
== 0) {
             if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) {
                ActiveMQServerLogger.LOGGER.debug("deleting auto-created queue \"" + queueName
+ ".\" consumerCount = " + consumerCount + "; messageCount = " + messageCount + "; getAutoDeleteJmsQueues
= " + settings.getAutoDeleteJmsQueues());
             }


Mime
View raw message