You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by mi...@apache.org on 2018/01/22 17:14:38 UTC

[1/2] activemq-artemis git commit: [ARTEMIS-1609] Add distinct name/address for JMS destinations

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 701ab1feb -> 56d4f816a


[ARTEMIS-1609] Add distinct name/address for JMS destinations

Fix internalCreateTopic method: the topics are keyed by their core
addresses, not their JMS names.


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

Branch: refs/heads/master
Commit: 2af7b3bdcb285b4d95e68d370063feb69ca8f4bc
Parents: 701ab1f
Author: Jeff Mesnil <jm...@gmail.com>
Authored: Fri Jan 19 16:01:51 2018 +0100
Committer: Michael Pearce <mi...@me.com>
Committed: Mon Jan 22 17:14:14 2018 +0000

----------------------------------------------------------------------
 .../artemis/jms/server/impl/JMSServerManagerImpl.java     |  2 +-
 .../integration/jms/server/JMSServerDeployerTest.java     | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2af7b3bd/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 15c5896..420b22b 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
@@ -1133,7 +1133,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
          ActiveMQTopic activeMQTopic = ActiveMQDestination.createTopic(address, topicName);
          server.addOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(activeMQTopic.getAddress()), RoutingType.MULTICAST));
 
-         topics.put(topicName, activeMQTopic);
+         topics.put(address, activeMQTopic);
 
          this.recoverregistryBindings(topicName, PersistedType.Topic);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/2af7b3bd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerDeployerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerDeployerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerDeployerTest.java
index 4f73910..f840c51 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerDeployerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerDeployerTest.java
@@ -79,6 +79,8 @@ public class JMSServerDeployerTest extends ActiveMQTestBase {
       doTestDeployTopicsWithUnusualNames("topic\\with\\backslashes\\in\\name", "/mytopic4");
 
       doTestDeployTopicsWithUnusualNames("topic with # chars and * chars in name", "/mytopic5");
+
+      doTestDeployTopicsWithUnusualNames("jms.topic.myTopic", "/mytopic6", "myTopic");
    }
 
    private void doTestDeployQueuesWithUnusualNames(final String queueName, final String jndiName) throws Exception {
@@ -97,6 +99,14 @@ public class JMSServerDeployerTest extends ActiveMQTestBase {
       Assert.assertEquals(topicName, topic.getTopicName());
    }
 
+   private void doTestDeployTopicsWithUnusualNames(final String topicName, final String jndiName, final String jmsTopicName) throws Exception {
+      jmsServer.createTopic(topicName, false, jmsTopicName, jndiName);
+
+      Topic topic = (Topic) context.lookup(jndiName);
+      Assert.assertNotNull(topic);
+      Assert.assertEquals(jmsTopicName, topic.getTopicName());
+   }
+
    // Package protected ---------------------------------------------
 
    // Protected -----------------------------------------------------


[2/2] activemq-artemis git commit: This closes #1795

Posted by mi...@apache.org.
This closes #1795


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

Branch: refs/heads/master
Commit: 56d4f816a4e51c0212e4272497247e8c02c1315b
Parents: 701ab1f 2af7b3b
Author: Michael Pearce <mi...@me.com>
Authored: Mon Jan 22 17:14:15 2018 +0000
Committer: Michael Pearce <mi...@me.com>
Committed: Mon Jan 22 17:14:15 2018 +0000

----------------------------------------------------------------------
 .../artemis/jms/server/impl/JMSServerManagerImpl.java     |  2 +-
 .../integration/jms/server/JMSServerDeployerTest.java     | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------