This closes #1795
This commit is contained in:
commit
56d4f816a4
|
@ -1133,7 +1133,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
|
||||||
ActiveMQTopic activeMQTopic = ActiveMQDestination.createTopic(address, topicName);
|
ActiveMQTopic activeMQTopic = ActiveMQDestination.createTopic(address, topicName);
|
||||||
server.addOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(activeMQTopic.getAddress()), RoutingType.MULTICAST));
|
server.addOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(activeMQTopic.getAddress()), RoutingType.MULTICAST));
|
||||||
|
|
||||||
topics.put(topicName, activeMQTopic);
|
topics.put(address, activeMQTopic);
|
||||||
|
|
||||||
this.recoverregistryBindings(topicName, PersistedType.Topic);
|
this.recoverregistryBindings(topicName, PersistedType.Topic);
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,8 @@ public class JMSServerDeployerTest extends ActiveMQTestBase {
|
||||||
doTestDeployTopicsWithUnusualNames("topic\\with\\backslashes\\in\\name", "/mytopic4");
|
doTestDeployTopicsWithUnusualNames("topic\\with\\backslashes\\in\\name", "/mytopic4");
|
||||||
|
|
||||||
doTestDeployTopicsWithUnusualNames("topic with # chars and * chars in name", "/mytopic5");
|
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 {
|
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());
|
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 ---------------------------------------------
|
// Package protected ---------------------------------------------
|
||||||
|
|
||||||
// Protected -----------------------------------------------------
|
// Protected -----------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue