You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2016/12/15 17:49:55 UTC

[1/3] activemq-artemis git commit: Do not autoDelete address if it was not autoCreated

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 2d7b77ac1 -> 4ee39e098


Do not autoDelete address if it was not autoCreated


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

Branch: refs/heads/master
Commit: 55fbcfebf8460a415573565f6dc447a1e9092ecc
Parents: 2d7b77a
Author: Martyn Taylor <mt...@redhat.com>
Authored: Thu Dec 15 17:13:09 2016 +0000
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Thu Dec 15 17:13:09 2016 +0000

----------------------------------------------------------------------
 .../amqp/proton/ProtonServerSenderContext.java        | 14 ++++++++++----
 .../artemis/core/server/impl/ActiveMQServerImpl.java  |  2 +-
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/55fbcfeb/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
index 52730e1..f6c7786 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
@@ -21,6 +21,7 @@ import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
 
+import org.apache.activemq.artemis.api.core.ActiveMQAddressDoesNotExistException;
 import org.apache.activemq.artemis.api.core.ActiveMQQueueExistsException;
 import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -247,13 +248,18 @@ public class ProtonServerSenderContext extends ProtonInitializable implements Pr
          boolean clientDefined = hasCapabilities(TOPIC, source) || hasCapabilities(QUEUE, source);
          if (clientDefined)  {
             multicast = hasCapabilities(TOPIC, source);
-            AddressInfo addressInfo = sessionSPI.getAddress(addressToUse);
-            Set<RoutingType> routingTypes = addressInfo.getRoutingTypes();
+            AddressQueryResult addressQueryResult = sessionSPI.addressQuery(addressToUse.toString(), defaultRoutingType, true);
+            if (!addressQueryResult.isExists()) {
+               throw ActiveMQAMQPProtocolMessageBundle.BUNDLE.sourceAddressDoesntExist();
+            }
+
+            Set<RoutingType> routingTypes = addressQueryResult.getRoutingTypes();
+
             //if the client defines 1 routing type and the broker another then throw an exception
             if (multicast && !routingTypes.contains(RoutingType.MULTICAST)) {
-               throw new ActiveMQAMQPIllegalStateException("Address " + addressInfo.getName() + " is not configured for topic support");
+               throw new ActiveMQAMQPIllegalStateException("Address " + addressToUse + " is not configured for topic support");
             } else if (!multicast && !routingTypes.contains(RoutingType.ANYCAST)) {
-               throw new ActiveMQAMQPIllegalStateException("Address " + addressInfo.getName() + " is not configured for queue support");
+               throw new ActiveMQAMQPIllegalStateException("Address " + addressToUse + " is not configured for queue support");
             }
          } else {
             //if not we look up the address

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/55fbcfeb/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 f186614..76ba050 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
@@ -1767,7 +1767,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
 
       queue.deleteQueue(removeConsumers);
 
-      if (autoDeleteAddress && postOffice != null) {
+      if (autoDeleteAddress && postOffice != null && getAddressInfo(address).isAutoCreated()) {
          try {
             removeAddressInfo(address, session);
          } catch (ActiveMQDeleteAddressException e) {


[3/3] activemq-artemis git commit: This closes #926

Posted by jb...@apache.org.
This closes #926


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

Branch: refs/heads/master
Commit: 4ee39e0982d40235f5ffb02ce419b1eff18839b5
Parents: 2d7b77a 117b51d
Author: jbertram <jb...@apache.org>
Authored: Thu Dec 15 11:43:25 2016 -0600
Committer: jbertram <jb...@apache.org>
Committed: Thu Dec 15 11:43:25 2016 -0600

----------------------------------------------------------------------
 .../amqp/proton/ProtonServerSenderContext.java        | 14 ++++++++++----
 .../artemis/core/server/impl/ActiveMQServerImpl.java  |  2 +-
 .../migrate/config/XMLConfigurationMigration.java     |  4 +---
 3 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[2/3] activemq-artemis git commit: Remove jms.queue prefix in conversion tool output

Posted by jb...@apache.org.
Remove jms.queue prefix in conversion tool output


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

Branch: refs/heads/master
Commit: 117b51da806575a4913ac3ab6b0aeca2c32e6259
Parents: 55fbcfe
Author: Martyn Taylor <mt...@redhat.com>
Authored: Thu Dec 15 17:13:37 2016 +0000
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Thu Dec 15 17:13:37 2016 +0000

----------------------------------------------------------------------
 .../artemis/tools/migrate/config/XMLConfigurationMigration.java  | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/117b51da/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java
----------------------------------------------------------------------
diff --git a/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java b/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java
index 6ffefad..3728fd6 100644
--- a/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java
+++ b/artemis-tools/src/main/java/org/apache/activemq/artemis/tools/migrate/config/XMLConfigurationMigration.java
@@ -66,8 +66,6 @@ public class XMLConfigurationMigration {
 
    private static final String xPathDurable = "durable";
 
-   private static final String jmsQueuePrefix = "jms.queue.";
-
    private final Map<String, Address> coreAddresses = new HashMap<>();
 
    private final Document document;
@@ -194,7 +192,7 @@ public class XMLConfigurationMigration {
          }
 
          Queue queue = new Queue();
-         queue.setName(jmsQueuePrefix + name);
+         queue.setName(name);
          queue.setDurable(getString(jmsQueueElement, xPathDurable));
          queue.setFilter(getString(jmsQueueElement, xPathSelector));
          queue.setRoutingType("anycast");