activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [4/6] activemq-artemis git commit: Fix AutoDeleteJmsQueueTest
Date Wed, 04 May 2016 20:55:22 GMT
Fix AutoDeleteJmsQueueTest


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

Branch: refs/heads/master
Commit: 500a734d047a3fb6445eff0fbb80c6b23593b21c
Parents: 89a0ffe
Author: jbertram <jbertram@apache.org>
Authored: Wed May 4 15:26:59 2016 -0500
Committer: jbertram <jbertram@apache.org>
Committed: Wed May 4 15:26:59 2016 -0500

----------------------------------------------------------------------
 .../artemis/jms/server/impl/JMSServerManagerImpl.java   | 11 +++++++++--
 .../activemq/artemis/core/server/ActiveMQServer.java    |  7 +++++++
 .../artemis/core/server/impl/ActiveMQServerImpl.java    | 12 +++++++++++-
 3 files changed, 27 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/500a734d/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 8fe181a..c9a1617 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
@@ -483,7 +483,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
          public void runException() throws Exception {
             checkBindings(bindings);
 
-            if (internalCreateQueue(queueName, selectorString, durable)) {
+            if (internalCreateQueue(queueName, selectorString, durable, autoCreated)) {
 
                ActiveMQDestination destination = queues.get(queueName);
                if (destination == null) {
@@ -1047,6 +1047,13 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
    private synchronized boolean internalCreateQueue(final String queueName,
                                        final String selectorString,
                                        final boolean durable) throws Exception {
+      return internalCreateQueue(queueName, selectorString, durable, false);
+   }
+
+   private synchronized boolean internalCreateQueue(final String queueName,
+                                       final String selectorString,
+                                       final boolean durable,
+                                       final boolean autoCreated) throws Exception {
       if (queues.get(queueName) != null) {
          return false;
       }
@@ -1060,7 +1067,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
             coreFilterString = SelectorTranslator.convertToActiveMQFilterString(selectorString);
          }
 
-         Queue queue = server.deployQueue(SimpleString.toSimpleString(activeMQQueue.getAddress()),
SimpleString.toSimpleString(activeMQQueue.getAddress()), SimpleString.toSimpleString(coreFilterString),
durable, false);
+         Queue queue = server.deployQueue(SimpleString.toSimpleString(activeMQQueue.getAddress()),
SimpleString.toSimpleString(activeMQQueue.getAddress()), SimpleString.toSimpleString(coreFilterString),
durable, false, autoCreated);
 
          queues.put(queueName, activeMQQueue);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/500a734d/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
index 2b0e322..3719453 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
@@ -254,6 +254,13 @@ public interface ActiveMQServer extends ActiveMQComponent {
                      boolean durable,
                      boolean temporary) throws Exception;
 
+   Queue deployQueue(SimpleString address,
+                     SimpleString queueName,
+                     SimpleString filterString,
+                     boolean durable,
+                     boolean temporary,
+                     boolean autoCreated) throws Exception;
+
    Queue locateQueue(SimpleString queueName);
 
    BindingQueryResult bindingQuery(SimpleString address) throws Exception;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/500a734d/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 29f2e7a..40a7b6c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -1406,6 +1406,16 @@ public class ActiveMQServerImpl implements ActiveMQServer {
                             final SimpleString filterString,
                             final boolean durable,
                             final boolean temporary) throws Exception {
+      return deployQueue(address, resourceName, filterString, durable, temporary, false);
+   }
+
+   @Override
+   public Queue deployQueue(final SimpleString address,
+                            final SimpleString resourceName,
+                            final SimpleString filterString,
+                            final boolean durable,
+                            final boolean temporary,
+                            final boolean autoCreated) throws Exception {
 
       if (resourceName.toString().toLowerCase().startsWith("jms.topic")) {
          ActiveMQServerLogger.LOGGER.deployTopic(resourceName);
@@ -1414,7 +1424,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          ActiveMQServerLogger.LOGGER.deployQueue(resourceName);
       }
 
-      return createQueue(address, resourceName, filterString, null, durable, temporary, true,
false, false);
+      return createQueue(address, resourceName, filterString, null, durable, temporary, true,
false, autoCreated);
    }
 
    @Override


Mime
View raw message