activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [47/50] [abbrv] activemq-artemis git commit: Remove JMS prefixes
Date Mon, 07 Nov 2016 16:37:07 GMT
Remove JMS prefixes


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

Branch: refs/heads/ARTEMIS-780
Commit: 3ac7a0c54b322e8aa92870249555b62519f9f623
Parents: 31173e9
Author: jbertram <jbertram@apache.com>
Authored: Fri Oct 21 19:58:01 2016 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Mon Nov 7 11:29:24 2016 -0500

----------------------------------------------------------------------
 .../commands/destination/DestinationAction.java |   2 +-
 .../cli/commands/tools/XmlDataImporter.java     |   6 +-
 .../activemq/cli/test/FileBrokerTest.java       |   2 +-
 artemis-cli/src/test/resources/broker-nojms.xml |   4 +-
 .../src/test/resources/broker-reload.xml        |   4 +-
 artemis-cli/src/test/resources/broker.xml       |   4 +-
 .../config/ActiveMQDefaultConfiguration.java    |   3 +-
 .../artemis/api/core/client/ClientSession.java  |   2 +
 .../core/management/ActiveMQServerControl.java  |  12 ++
 .../core/management/AddressSettingsInfo.java    |   4 +-
 .../api/core/management/ResourceNames.java      |   4 +-
 .../artemis/api/core/management/RoleInfo.java   |  15 +-
 .../core/client/impl/ClientSessionImpl.java     |  12 ++
 .../core/impl/ActiveMQSessionContext.java       |   7 +
 .../core/protocol/core/impl/PacketDecoder.java  |   6 +
 .../core/protocol/core/impl/PacketImpl.java     |   2 +
 .../impl/wireformat/CreateAddressMessage.java   | 116 ++++++++++++
 .../activemq/artemis/core/security/Role.java    |  31 +++-
 .../spi/core/remoting/SessionContext.java       |   2 +
 .../artemis/utils/SecurityFormatter.java        |   7 +-
 .../main/resources/activemq-version.properties  |   2 +-
 .../artemis/jms/client/ActiveMQDestination.java |  40 ++--
 .../artemis/jms/client/ActiveMQMessage.java     |  29 ++-
 .../jms/client/ActiveMQMessageConsumer.java     |   2 +
 .../jms/client/ActiveMQMessageProducer.java     |  16 +-
 .../artemis/jms/client/ActiveMQQueue.java       |   6 +-
 .../artemis/jms/client/ActiveMQSession.java     |  34 ++--
 .../artemis/jms/client/ActiveMQTopic.java       |   4 +-
 .../management/impl/JMSServerControlImpl.java   |  64 +++----
 .../management/impl/JMSTopicControlImpl.java    |   8 +-
 .../jms/server/impl/JMSServerManagerImpl.java   | 183 +++++++++----------
 .../impl/JMSManagementServiceImpl.java          |   8 +-
 ...MSResourceMultipleFileConfigurationTest.java |   2 +-
 ...dJMSResourceSingleFileConfigurationTest.java |   2 +-
 .../amqp/broker/ProtonProtocolManager.java      |   3 +-
 .../amqp/converter/TestConversions.java         |   2 +-
 .../core/protocol/openwire/amq/AMQConsumer.java |  11 +-
 .../core/protocol/openwire/amq/AMQSession.java  |   7 +-
 .../protocol/openwire/util/OpenWireUtil.java    |  15 +-
 .../core/protocol/stomp/StompConnection.java    |  12 +-
 .../core/protocol/stomp/StompSession.java       |   3 +-
 .../EmbeddedRestActiveMQJMSTest.java            |   2 +-
 .../artemis/rest/test/EmbeddedTest.java         |   2 +-
 .../activemq/artemis/rest/test/JMSTest.java     |  20 +-
 .../artemis/rest/test/SelectorTest.java         |  31 ++--
 .../activemq/artemis/rest/test/XmlTest.java     |   2 +-
 artemis-rest/src/test/resources/broker.xml      |   2 +-
 .../impl/ActiveMQServerControlImpl.java         |  22 ++-
 .../core/persistence/AddressBindingInfo.java    |   2 +
 .../core/persistence/QueueBindingInfo.java      |   2 +-
 .../core/persistence/config/PersistedRoles.java |  26 ++-
 .../journal/AbstractJournalStorageManager.java  |   4 +-
 .../codec/PersistentAddressBindingEncoding.java |  17 +-
 .../codec/PersistentQueueBindingEncoding.java   |  14 +-
 .../core/postoffice/impl/PostOfficeImpl.java    |  11 ++
 .../postoffice/impl/SimpleAddressManager.java   |   5 +-
 .../core/ServerSessionPacketHandler.java        |  11 ++
 .../artemis/core/security/CheckType.java        |   6 +
 .../artemis/core/server/ActiveMQServer.java     |   4 +-
 .../artemis/core/server/QueueConfig.java        |  10 +-
 .../artemis/core/server/ServerSession.java      |   3 +
 .../core/server/cluster/impl/BridgeImpl.java    |  18 +-
 .../core/server/impl/ActiveMQServerImpl.java    |  79 +++++---
 .../artemis/core/server/impl/AddressInfo.java   |  21 ++-
 .../server/impl/PostOfficeJournalLoader.java    |   3 +-
 .../artemis/core/server/impl/QueueImpl.java     |   7 +-
 .../core/server/impl/ScaleDownHandler.java      |   2 +-
 .../core/server/impl/ServerSessionImpl.java     |  27 ++-
 .../management/impl/ManagementServiceImpl.java  |   2 +
 .../core/settings/impl/AddressSettings.java     |  43 +++--
 .../impl/FileConfigurationParserTest.java       |   2 +-
 .../core/config/impl/FileConfigurationTest.java |   4 +-
 .../WrongRoleFileConfigurationParserTest.java   |   2 +-
 .../artemis/core/security/RoleTest.java         |  25 ++-
 .../core/settings/AddressSettingsTest.java      |   8 +-
 .../artemis/core/settings/RepositoryTest.java   |  14 +-
 .../artemis/jms/example/ManagementExample.java  |   4 +-
 .../jms/example/PreacknowledgeExample.java      |   2 +-
 .../rest/dup-send/src/main/java/PostOrder.java  |   2 +-
 .../dup-send/src/main/java/PostOrderWithId.java |   2 +-
 .../dup-send/src/main/java/ReceiveOrder.java    |   2 +-
 .../messaging/test/AutoAckTopicTest.java        |   2 +-
 .../jms-to-rest/src/main/java/JmsReceive.java   |   2 +-
 .../rest/jms-to-rest/src/main/java/JmsSend.java |   2 +-
 .../jms-to-rest/src/main/java/RestReceive.java  |   2 +-
 .../jms-to-rest/src/main/java/RestSend.java     |   2 +-
 .../rest/push/src/main/java/PostOrder.java      |   2 +-
 .../rest/push/src/main/java/PushReg.java        |   4 +-
 .../push/src/main/java/ReceiveShipping.java     |   2 +-
 .../artemis/jms/example/ProtonCPPExample.java   |   2 +-
 .../artemis/jms/example/AMQPQueueExample.java   |   2 +-
 .../example/StompDualAuthenticationExample.java |   2 +-
 .../StompEmbeddedWithInterceptorExample.java    |   2 +-
 .../artemis/jms/example/StompExample.java       |   2 -
 .../artemis/jms/example/StompExample.java       |   2 +-
 .../artemis/jms/example/StompExample.java       |   2 +-
 .../artemis/jms/example/StompExample.java       |   2 +-
 pom.xml                                         |   2 +-
 .../artemiswrapper/ArtemisBrokerWrapper.java    |  14 +-
 .../JmsQueueCompositeSendReceiveTest.java       |   2 +-
 .../org/apache/activemq/OptimizedAckTest.java   |   6 +-
 .../apache/activemq/RemoveDestinationTest.java  |   2 +-
 .../activemq/ZeroPrefetchConsumerTest.java      |   2 +-
 .../activemq/transport/SoWriteTimeoutTest.java  |   4 +-
 .../transport/failover/AMQ1925Test.java         |   2 +-
 .../FailoverConsumerUnconsumedTest.java         |   2 +-
 .../LargeMessageOverReplicationTest.java        |   2 +-
 ...eOnSyncLargeMessageOverReplication2Test.java |   2 +-
 ...ceOnSyncLargeMessageOverReplicationTest.java |   2 +-
 .../extras/byteman/StompInternalStateTest.java  |   2 +-
 .../tests/extras/byteman/TimeoutXATest.java     |   2 +-
 .../tests/extras/jms/bridge/BridgeTestBase.java |   7 +-
 .../jms/bridge/ClusteredBridgeTestBase.java     |   4 +-
 ...MDBMultipleHandlersServerDisconnectTest.java |   4 +-
 .../integration/addressing/AddressingTest.java  |   2 +-
 .../integration/amqp/AmqpClientTestSupport.java |   4 +-
 .../amqp/AmqpDurableReceiverTest.java           |   2 +-
 .../amqp/AmqpTempDestinationTest.java           |   2 +
 .../amqp/ProtonMaxFrameSizeTest.java            |   6 +-
 .../tests/integration/amqp/ProtonTest.java      |  14 +-
 .../amqp/SendingAndReceivingTest.java           |   2 +-
 .../integration/cli/DestinationCommandTest.java |   4 +-
 .../client/AutoCreateJmsDestinationTest.java    |  42 +++--
 .../client/AutoDeleteJmsDestinationTest.java    |  18 +-
 .../integration/client/HangConsumerTest.java    |   4 +-
 .../client/InterruptedLargeMessageTest.java     |   2 +-
 .../client/JMSMessageCounterTest.java           |   5 +-
 .../client/JMSPagingFileDeleteTest.java         |   6 +-
 .../client/JmsNettyNioStressTest.java           |   4 +-
 .../client/MultipleProducersTest.java           |  11 +-
 .../clientcrash/PendingDeliveriesTest.java      |   4 +-
 .../integration/cluster/bridge/BridgeTest.java  |   6 +-
 .../cluster/distribution/ClusterTestBase.java   |   4 +-
 .../distribution/SymmetricClusterTest.java      |  22 +--
 .../AutomaticColocatedQuorumVoteTest.java       |   2 +-
 .../MultipleServerFailoverTestBase.java         |   4 +-
 .../cluster/failover/SecurityFailoverTest.java  |   2 +-
 .../crossprotocol/AMQPToOpenwireTest.java       |   4 +-
 .../crossprotocol/OpenWireToAMQPTest.java       |   4 +-
 .../divert/ReplicationWithDivertTest.java       |   4 +-
 .../interceptors/InterceptorTest.java           |   3 +-
 .../jms/ActiveMQConnectionFactoryTest.java      |  17 +-
 .../tests/integration/jms/JmsProducerTest.java  |   1 -
 .../tests/integration/jms/RedeployTest.java     |   8 +-
 .../integration/jms/client/CreateQueueTest.java |   9 +-
 .../jms/client/TopicCleanupTest.java            |   2 +-
 .../jms/cluster/BindingsClusterTest.java        |  58 +++---
 .../jms/cluster/JMSFailoverListenerTest.java    |   5 +-
 .../jms/cluster/JMSFailoverTest.java            |   7 +-
 .../jms/cluster/JMSReconnectTest.java           |   7 +-
 .../jms/cluster/LargeMessageOverBridgeTest.java |  20 +-
 .../jms/cluster/TemporaryQueueClusterTest.java  |  24 ++-
 .../jms/cluster/TopicClusterTest.java           |  11 +-
 .../integration/jms/consumer/ConsumerTest.java  |   9 +-
 .../jms/divert/DivertAndACKClientTest.java      |   2 +-
 .../jms/jms2client/NonExistentQueueTest.java    |   2 +-
 .../server/management/JMSQueueControlTest.java  |   2 +-
 .../management/JMSQueueControlUsingJMSTest.java |   3 +-
 .../management/JMSServerControl2Test.java       |  20 +-
 .../server/management/JMSServerControlTest.java |   8 +-
 .../jms/server/management/TopicControlTest.java |   9 +-
 .../management/TopicControlUsingJMSTest.java    |   3 +-
 .../journal/DuplicateRecordIdTest.java          |   2 +-
 .../integration/karaf/ArtemisFeatureTest.java   |   2 +-
 .../management/ActiveMQServerControlTest.java   |  10 +-
 .../ActiveMQServerControlUsingCoreTest.java     |  14 ++
 .../management/AddressControlTest.java          |   4 +-
 .../management/AddressControlUsingCoreTest.java |   2 +-
 ...tyManagementWithConfiguredAdminUserTest.java |   4 +-
 .../management/SecurityNotificationTest.java    |   4 +-
 .../integration/mqtt/imported/MQTTTest.java     |   2 +-
 .../integration/openwire/BasicOpenWireTest.java |   8 +-
 .../integration/openwire/OpenWireTestBase.java  |  10 +-
 .../openwire/SimpleOpenWireTest.java            |  18 +-
 .../openwire/VerySimpleOenwireTest.java         |   4 +-
 .../amq/ProducerFlowControlSendFailTest.java    |   2 +-
 .../openwire/amq/ProducerFlowControlTest.java   |   2 +-
 .../integration/paging/PagingOrderTest.java     |  14 +-
 .../integration/paging/PagingReceiveTest.java   |   2 +-
 .../RolesConfigurationStorageTest.java          |  10 +-
 .../integration/ra/ActiveMQClusteredTest.java   |   2 +-
 .../ra/ActiveMQMessageHandlerSecurityTest.java  |   2 +-
 .../ra/ActiveMQMessageHandlerTest.java          |  14 +-
 .../integration/ra/ActiveMQRATestBase.java      |   6 +-
 .../tests/integration/ra/JMSContextTest.java    |   2 +-
 .../integration/ra/OutgoingConnectionTest.java  |   2 +-
 .../ra/OutgoingConnectionTestJTA.java           |   6 +-
 .../rest/RestDeserializationTest.java           |   9 +-
 .../rest/util/QueueRestMessageContext.java      |   2 +-
 .../rest/util/TopicRestMessageContext.java      |   2 +-
 .../integration/security/LDAPSecurityTest.java  |   4 +-
 .../integration/security/SecurityTest.java      | 102 +++++------
 .../integration/server/ResourceLimitTest.java   |   2 +-
 .../integration/ssl/DualAuthenticationTest.java |   4 +-
 .../tests/integration/stomp/StompTest.java      |  15 +-
 .../tests/integration/stomp/StompTestBase.java  |   8 +-
 .../util/AbstractStompClientConnection.java     |   3 +
 .../integration/stomp/v11/StompV11Test.java     |   4 +-
 .../integration/stomp/v11/StompV11TestBase.java |   4 +-
 .../integration/stomp/v12/StompV12Test.java     |   4 +-
 .../tests/util/JMSClusteredTestBase.java        |   4 +-
 .../src/test/resources/reload-test-jms.xml      |   4 +-
 .../test/resources/reload-test-updated-jms.xml  |   8 +-
 .../jms/tests/ActiveMQServerTestCase.java       |   2 +-
 .../activemq/artemis/jms/tests/BrowserTest.java |   2 +-
 .../artemis/jms/tests/MessageProducerTest.java  |   2 +-
 .../activemq/artemis/jms/tests/SessionTest.java |   4 +-
 .../jms/tests/message/MessageHeaderTest.java    |   5 +
 .../tests/tools/container/LocalTestServer.java  |  12 +-
 .../artemis/amqpJMS/ActiveMQAMQPAdmin.java      |   4 +-
 .../message/headers/MessageHeaderTest.java      |   4 +-
 .../storage/SendReceiveMultiThreadTest.java     |   4 +-
 .../impl/WildcardAddressManagerUnitTest.java    |   8 +-
 .../impl/ActiveMQSecurityManagerImplTest.java   |  28 +--
 .../tests/unit/jms/ActiveMQDestinationTest.java |  21 ++-
 215 files changed, 1254 insertions(+), 841 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/destination/DestinationAction.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/destination/DestinationAction.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/destination/DestinationAction.java
index e161dd3..55353d9 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/destination/DestinationAction.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/destination/DestinationAction.java
@@ -82,7 +82,7 @@ public abstract class DestinationAction extends ConnectionAbstract {
            ClientSessionFactory sessionFactory = locator.createSessionFactory();
            ClientSession session = sessionFactory.createSession(user, password, false, true, true, false, ActiveMQClient.DEFAULT_ACK_BATCH_SIZE)) {
          session.start();
-         ClientRequestor requestor = new ClientRequestor(session, "jms.queue.activemq.management");
+         ClientRequestor requestor = new ClientRequestor(session, "activemq.management");
          ClientMessage message = session.createMessage(false);
 
          cb.setUpInvocation(message);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
index 8cd0784..587e402 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataImporter.java
@@ -326,7 +326,7 @@ public final class XmlDataImporter extends ActionAbstract {
             // Get the ID of the queues involved so the message can be routed properly.  This is done because we cannot
             // send directly to a queue, we have to send to an address instead but not all the queues related to the
             // address may need the message
-            try (ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.activemq.management")) {
+            try (ClientRequestor requestor = new ClientRequestor(managementSession, "activemq.management")) {
                ClientMessage managementMessage = managementSession.createMessage(false);
                ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
                managementSession.start();
@@ -825,7 +825,7 @@ public final class XmlDataImporter extends ActionAbstract {
          reader.next();
       }
 
-      try (ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.activemq.management")) {
+      try (ClientRequestor requestor = new ClientRequestor(managementSession, "activemq.management")) {
          ClientMessage managementMessage = managementSession.createMessage(false);
          ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, "createConnectionFactory", name, Boolean.parseBoolean(ha), discoveryGroupName.length() > 0, Integer.parseInt(type), connectors, entries, clientId, Long.parseLong(clientFailureCheckPeriod), Long.parseLong(connectionTtl), Long.parseLong(callTimeout), Long.parseLong(callFailoverTimeout), Integer.parseInt(minLargeMessageSize), Boolean.parseBoolean(compressLargeMessages), Integer.parseInt(consumerWindowSize), Integer.parseInt(consumerMaxRate), Integer.parseInt(confirmationWindowSize), Integer.parseInt(producerWindowSize), Integer.parseInt(producerMaxRate), Boolean.parseBoolean(blockOnAcknowledge), Boolean.parseBoolean(blockOnDurableSend), Boolean.parseBoolean(blockOnNonDurableSend), Boolean.parseBoolean(autoGroup), Boolean.parseBoolean(preacknowledge), loadBalancingPolicyClassName, Integer.parseInt(transactionBatchSize), Integer.parseInt(dupsOkBatchSize), Boolean.parseBoolean(useGlobalPools), In
 teger.parseInt(scheduledThreadMaxPoolSize), Integer.parseInt(threadMaxPoolSize), Long.parseLong(retryInterval), Double.parseDouble(retryIntervalMultiplier), Long.parseLong(maxRetryInterval), Integer.parseInt(reconnectAttempts), Boolean.parseBoolean(failoverOnInitialConnection), groupId);
          //Boolean.parseBoolean(cacheLargeMessagesClient));
@@ -883,7 +883,7 @@ public final class XmlDataImporter extends ActionAbstract {
          reader.next();
       }
 
-      try (ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.activemq.management")) {
+      try (ClientRequestor requestor = new ClientRequestor(managementSession, "activemq.management")) {
          ClientMessage managementMessage = managementSession.createMessage(false);
          if ("Queue".equals(type)) {
             ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, "createQueue", name, entries, selector);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-cli/src/test/java/org/apache/activemq/cli/test/FileBrokerTest.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/FileBrokerTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/FileBrokerTest.java
index 296a3d2..a50a49f 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/FileBrokerTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/FileBrokerTest.java
@@ -114,7 +114,7 @@ public class FileBrokerTest {
          ServerLocator locator = ActiveMQClient.createServerLocator("tcp://localhost:61616");
          ClientSessionFactory sf = locator.createSessionFactory();
          ClientSession session = sf.createSession("myUser", "myPass", false, true, false, false, 0);
-         ClientProducer producer = session.createProducer("jms.queue.DLQ");
+         ClientProducer producer = session.createProducer("DLQ");
          producer.send(session.createMessage(true));
 
          replacePatternInFile(path, "guest", "X");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-cli/src/test/resources/broker-nojms.xml
----------------------------------------------------------------------
diff --git a/artemis-cli/src/test/resources/broker-nojms.xml b/artemis-cli/src/test/resources/broker-nojms.xml
index e0fcced..11cb787 100644
--- a/artemis-cli/src/test/resources/broker-nojms.xml
+++ b/artemis-cli/src/test/resources/broker-nojms.xml
@@ -61,8 +61,8 @@ under the License.
       <address-settings>
          <!--default for catch all-->
          <address-setting match="#">
-            <dead-letter-address>jms.queue.DLQ</dead-letter-address>
-            <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+            <dead-letter-address>DLQ</dead-letter-address>
+            <expiry-address>ExpiryQueue</expiry-address>
             <redelivery-delay>0</redelivery-delay>
             <max-size-bytes>10485760</max-size-bytes>
             <message-counter-history-day-limit>10</message-counter-history-day-limit>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-cli/src/test/resources/broker-reload.xml
----------------------------------------------------------------------
diff --git a/artemis-cli/src/test/resources/broker-reload.xml b/artemis-cli/src/test/resources/broker-reload.xml
index 3063f5f..93f909c 100644
--- a/artemis-cli/src/test/resources/broker-reload.xml
+++ b/artemis-cli/src/test/resources/broker-reload.xml
@@ -64,8 +64,8 @@ under the License.
       <address-settings>
          <!--default for catch all-->
          <address-setting match="#">
-            <dead-letter-address>jms.queue.DLQ</dead-letter-address>
-            <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+            <dead-letter-address>DLQ</dead-letter-address>
+            <expiry-address>ExpiryQueue</expiry-address>
             <redelivery-delay>0</redelivery-delay>
             <max-size-bytes>10485760</max-size-bytes>
             <message-counter-history-day-limit>10</message-counter-history-day-limit>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-cli/src/test/resources/broker.xml
----------------------------------------------------------------------
diff --git a/artemis-cli/src/test/resources/broker.xml b/artemis-cli/src/test/resources/broker.xml
index de51e9a..d4e2400 100644
--- a/artemis-cli/src/test/resources/broker.xml
+++ b/artemis-cli/src/test/resources/broker.xml
@@ -65,8 +65,8 @@ under the License.
       <address-settings>
          <!--default for catch all-->
          <address-setting match="#">
-            <dead-letter-address>jms.queue.DLQ</dead-letter-address>
-            <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+            <dead-letter-address>DLQ</dead-letter-address>
+            <expiry-address>ExpiryQueue</expiry-address>
             <redelivery-delay>0</redelivery-delay>
             <max-size-bytes>10485760</max-size-bytes>
             <message-counter-history-day-limit>10</message-counter-history-day-limit>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
index b952430..f9861a4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
@@ -157,8 +157,7 @@ public final class ActiveMQDefaultConfiguration {
    // true means that the server supports wild card routing
    private static boolean DEFAULT_WILDCARD_ROUTING_ENABLED = true;
 
-   // the name of the management address to send management messages to. It is prefixed with "jms.queue" so that JMS clients can send messages to it.
-   private static SimpleString DEFAULT_MANAGEMENT_ADDRESS = new SimpleString("jms.queue.activemq.management");
+   private static SimpleString DEFAULT_MANAGEMENT_ADDRESS = new SimpleString("activemq.management");
 
    // the name of the address that consumers bind to receive management notifications
    private static SimpleString DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS = new SimpleString("activemq.notifications");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
index dd1c45c..fbd33d3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java
@@ -198,6 +198,8 @@ public interface ClientSession extends XAResource, AutoCloseable {
     */
    int getVersion();
 
+   void createAddress(final SimpleString address, final boolean multicast) throws ActiveMQException;
+
    // Queue Operations ----------------------------------------------
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
index 075a5ef..87a4a79 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ActiveMQServerControl.java
@@ -747,6 +747,18 @@ public interface ActiveMQServerControl {
                             @Parameter(desc = "a comma-separated list of roles allowed to send management messages messages", name = "manage") String manageRoles,
                             @Parameter(desc = "a comma-separated list of roles allowed to browse queues", name = "browse") String browseRoles) throws Exception;
 
+   @Operation(desc = "Add security settings for addresses matching the addressMatch", impact = MBeanOperationInfo.ACTION)
+   void addSecuritySettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch,
+                            @Parameter(desc = "a comma-separated list of roles allowed to send messages", name = "send") String sendRoles,
+                            @Parameter(desc = "a comma-separated list of roles allowed to consume messages", name = "consume") String consumeRoles,
+                            @Parameter(desc = "a comma-separated list of roles allowed to create durable queues", name = "createDurableQueueRoles") String createDurableQueueRoles,
+                            @Parameter(desc = "a comma-separated list of roles allowed to delete durable queues", name = "deleteDurableQueueRoles") String deleteDurableQueueRoles,
+                            @Parameter(desc = "a comma-separated list of roles allowed to create non durable queues", name = "createNonDurableQueueRoles") String createNonDurableQueueRoles,
+                            @Parameter(desc = "a comma-separated list of roles allowed to delete non durable queues", name = "deleteNonDurableQueueRoles") String deleteNonDurableQueueRoles,
+                            @Parameter(desc = "a comma-separated list of roles allowed to send management messages messages", name = "manage") String manageRoles,
+                            @Parameter(desc = "a comma-separated list of roles allowed to browse queues", name = "browse") String browseRoles,
+                            @Parameter(desc = "a comma-separated list of roles allowed to create addresses", name = "createAddressRoles") String createAddressRoles) throws Exception;
+
    @Operation(desc = "Remove security settings for an address", impact = MBeanOperationInfo.ACTION)
    void removeSecuritySettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch) throws Exception;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java
index b182470..7c2b074 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java
@@ -67,7 +67,7 @@ public final class AddressSettingsInfo {
 
    public static AddressSettingsInfo from(final String jsonString) {
       JsonObject object = JsonUtil.readJsonObject(jsonString);
-      return new AddressSettingsInfo(object.getString("addressFullMessagePolicy"), object.getJsonNumber("maxSizeBytes").longValue(), object.getInt("pageSizeBytes"), object.getInt("pageCacheMaxSize"), object.getInt("maxDeliveryAttempts"), object.getJsonNumber("redeliveryDelay").longValue(), object.getJsonNumber("redeliveryMultiplier").doubleValue(), object.getJsonNumber("maxRedeliveryDelay").longValue(), object.getString("DLA"), object.getString("expiryAddress"), object.getBoolean("lastValueQueue"), object.getJsonNumber("redistributionDelay").longValue(), object.getBoolean("sendToDLAOnNoRoute"), object.getJsonNumber("slowConsumerThreshold").longValue(), object.getJsonNumber("slowConsumerCheckPeriod").longValue(), object.getString("slowConsumerPolicy"), object.getBoolean("autoCreateJmsQueues"), object.getBoolean("autoDeleteJmsQueues"), object.getBoolean("autoCreateJmsTopics"), object.getBoolean("autoDeleteJmsTopics"));
+      return new AddressSettingsInfo(object.getString("addressFullMessagePolicy"), object.getJsonNumber("maxSizeBytes").longValue(), object.getInt("pageSizeBytes"), object.getInt("pageCacheMaxSize"), object.getInt("maxDeliveryAttempts"), object.getJsonNumber("redeliveryDelay").longValue(), object.getJsonNumber("redeliveryMultiplier").doubleValue(), object.getJsonNumber("maxRedeliveryDelay").longValue(), object.getString("DLA"), object.getString("expiryAddress"), object.getBoolean("lastValueQueue"), object.getJsonNumber("redistributionDelay").longValue(), object.getBoolean("sendToDLAOnNoRoute"), object.getJsonNumber("slowConsumerThreshold").longValue(), object.getJsonNumber("slowConsumerCheckPeriod").longValue(), object.getString("slowConsumerPolicy"), object.getBoolean("autoCreateJmsQueues"), object.getBoolean("autoCreateJmsTopics"), object.getBoolean("autoDeleteJmsQueues"), object.getBoolean("autoDeleteJmsTopics"));
    }
 
    // Constructors --------------------------------------------------
@@ -89,8 +89,8 @@ public final class AddressSettingsInfo {
                               long slowConsumerCheckPeriod,
                               String slowConsumerPolicy,
                               boolean autoCreateJmsQueues,
-                              boolean autoDeleteJmsQueues,
                               boolean autoCreateJmsTopics,
+                              boolean autoDeleteJmsQueues,
                               boolean autoDeleteJmsTopics) {
       this.addressFullMessagePolicy = addressFullMessagePolicy;
       this.maxSizeBytes = maxSizeBytes;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
index 37f74ed..a8c7632 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ResourceNames.java
@@ -44,9 +44,9 @@ public final class ResourceNames {
 
    public static final String JMS_SERVER = "jms.server";
 
-   public static final String JMS_QUEUE = "jms.queue.";
+//   public static final String JMS_QUEUE = "jms.queue.";
 
-   public static final String JMS_TOPIC = "jms.topic.";
+//   public static final String JMS_TOPIC = "jms.topic.";
 
    public static final String JMS_CONNECTION_FACTORY = "jms.connectionfactory.";
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
index d3fc9db..bbf12aa 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
@@ -45,6 +45,8 @@ public final class RoleInfo {
 
    private final boolean browse;
 
+   private final boolean createAddress;
+
    /**
     * Returns an array of RoleInfo corresponding to the JSON serialization returned
     * by {@link AddressControl#getRolesAsJSON()}.
@@ -54,7 +56,7 @@ public final class RoleInfo {
       RoleInfo[] roles = new RoleInfo[array.size()];
       for (int i = 0; i < array.size(); i++) {
          JsonObject r = array.getJsonObject(i);
-         RoleInfo role = new RoleInfo(r.getString("name"), r.getBoolean("send"), r.getBoolean("consume"), r.getBoolean("createDurableQueue"), r.getBoolean("deleteDurableQueue"), r.getBoolean("createNonDurableQueue"), r.getBoolean("deleteNonDurableQueue"), r.getBoolean("manage"), r.getBoolean("browse"));
+         RoleInfo role = new RoleInfo(r.getString("name"), r.getBoolean("send"), r.getBoolean("consume"), r.getBoolean("createDurableQueue"), r.getBoolean("deleteDurableQueue"), r.getBoolean("createNonDurableQueue"), r.getBoolean("deleteNonDurableQueue"), r.getBoolean("manage"), r.getBoolean("browse"), r.getBoolean("createAddress"));
          roles[i] = role;
       }
       return roles;
@@ -68,7 +70,8 @@ public final class RoleInfo {
                     final boolean createNonDurableQueue,
                     final boolean deleteNonDurableQueue,
                     final boolean manage,
-                    final boolean browse) {
+                    final boolean browse,
+                    final boolean createAddress) {
       this.name = name;
       this.send = send;
       this.consume = consume;
@@ -78,6 +81,7 @@ public final class RoleInfo {
       this.deleteNonDurableQueue = deleteNonDurableQueue;
       this.manage = manage;
       this.browse = browse;
+      this.createAddress = createAddress;
    }
 
    /**
@@ -142,4 +146,11 @@ public final class RoleInfo {
    public boolean isBrowse() {
       return browse;
    }
+
+   /**
+    * Returns whether this role can create addresses.
+    */
+   public boolean isCreateAddress() {
+      return createAddress;
+   }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
index fd6355a..2739109 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
@@ -279,6 +279,18 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
    }
 
    @Override
+   public void createAddress(final SimpleString address, final boolean multicast) throws ActiveMQException {
+      checkClosed();
+
+      startCall();
+      try {
+         sessionContext.createAddress(address, multicast);
+      } finally {
+         endCall();
+      }
+   }
+
+   @Override
    public void createQueue(final SimpleString address,
                            final SimpleString queueName,
                            final SimpleString filterString,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
index 56c7135..4e25037 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
@@ -50,6 +50,7 @@ import org.apache.activemq.artemis.core.protocol.core.CommandConfirmationHandler
 import org.apache.activemq.artemis.core.protocol.core.CoreRemotingConnection;
 import org.apache.activemq.artemis.core.protocol.core.Packet;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.ActiveMQExceptionMessage;
+import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateAddressMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateQueueMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSessionMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSharedQueueMessage;
@@ -583,6 +584,12 @@ public class ActiveMQSessionContext extends SessionContext {
    }
 
    @Override
+   public void createAddress(SimpleString address, final boolean multicast) throws ActiveMQException {
+      CreateAddressMessage request = new CreateAddressMessage(address, multicast, true);
+      sessionChannel.sendBlocking(request, PacketImpl.NULL_RESPONSE);
+   }
+
+   @Override
    public void createQueue(SimpleString address,
                            SimpleString queueName,
                            SimpleString filterString,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java
index 54c2022..834822c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketDecoder.java
@@ -27,6 +27,7 @@ import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CheckFailo
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.ClusterTopologyChangeMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.ClusterTopologyChangeMessage_V2;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.ClusterTopologyChangeMessage_V3;
+import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateAddressMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateQueueMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSessionMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSessionResponseMessage;
@@ -88,6 +89,7 @@ import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.CLU
 import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.CLUSTER_TOPOLOGY_V3;
 import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.CREATESESSION;
 import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.CREATESESSION_RESP;
+import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.CREATE_ADDRESS;
 import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.CREATE_QUEUE;
 import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.CREATE_SHARED_QUEUE;
 import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.DELETE_QUEUE;
@@ -235,6 +237,10 @@ public abstract class PacketDecoder implements Serializable {
             packet = new SessionQueueQueryResponseMessage_V2();
             break;
          }
+         case CREATE_ADDRESS: {
+            packet = new CreateAddressMessage();
+            break;
+         }
          case CREATE_QUEUE: {
             packet = new CreateQueueMessage();
             break;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java
index 6dddf3b..e07d9b5 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java
@@ -249,6 +249,8 @@ public class PacketImpl implements Packet {
 
    public static final byte SESS_BINDINGQUERY_RESP_V3 = -10;
 
+   public static final byte CREATE_ADDRESS = -11;
+
    // Static --------------------------------------------------------
 
    public PacketImpl(final byte type) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateAddressMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateAddressMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateAddressMessage.java
new file mode 100644
index 0000000..484a2ac
--- /dev/null
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateAddressMessage.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
+
+import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
+import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
+
+public class CreateAddressMessage extends PacketImpl {
+
+   private SimpleString address;
+
+   private boolean multicast;
+
+   private boolean requiresResponse;
+
+   public CreateAddressMessage(final SimpleString address,
+                               final boolean multicast,
+                               final boolean requiresResponse) {
+      this();
+
+      this.address = address;
+      this.multicast = multicast;
+      this.requiresResponse = requiresResponse;
+   }
+
+   public CreateAddressMessage() {
+      super(CREATE_ADDRESS);
+   }
+
+   // Public --------------------------------------------------------
+
+   @Override
+   public String toString() {
+      StringBuffer buff = new StringBuffer(getParentString());
+      buff.append(", address=" + address);
+      buff.append(", multicast=" + multicast);
+      buff.append("]");
+      return buff.toString();
+   }
+
+   public SimpleString getAddress() {
+      return address;
+   }
+
+   public boolean isMulticast() {
+      return multicast;
+   }
+
+   public boolean isRequiresResponse() {
+      return requiresResponse;
+   }
+
+   public void setAddress(SimpleString address) {
+      this.address = address;
+   }
+
+   @Override
+   public void encodeRest(final ActiveMQBuffer buffer) {
+      buffer.writeSimpleString(address);
+      buffer.writeBoolean(multicast);
+      buffer.writeBoolean(requiresResponse);
+   }
+
+   @Override
+   public void decodeRest(final ActiveMQBuffer buffer) {
+      address = buffer.readSimpleString();
+      multicast = buffer.readBoolean();
+      requiresResponse = buffer.readBoolean();
+   }
+
+   @Override
+   public int hashCode() {
+      final int prime = 31;
+      int result = super.hashCode();
+      result = prime * result + ((address == null) ? 0 : address.hashCode());
+      result = prime * result + (multicast ? 1231 : 1237);
+      result = prime * result + (requiresResponse ? 1231 : 1237);
+      return result;
+   }
+
+   @Override
+   public boolean equals(Object obj) {
+      if (this == obj)
+         return true;
+      if (!super.equals(obj))
+         return false;
+      if (!(obj instanceof CreateAddressMessage))
+         return false;
+      CreateAddressMessage other = (CreateAddressMessage) obj;
+      if (address == null) {
+         if (other.address != null)
+            return false;
+      } else if (!address.equals(other.address))
+         return false;
+      if (multicast != other.multicast)
+         return false;
+      if (requiresResponse != other.requiresResponse)
+         return false;
+      return true;
+   }
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/security/Role.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/security/Role.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/security/Role.java
index 2efddfa..2792d52 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/security/Role.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/security/Role.java
@@ -34,6 +34,8 @@ public class Role implements Serializable {
 
    private final boolean consume;
 
+   private final boolean createAddress;
+
    private final boolean createDurableQueue;
 
    private final boolean deleteDurableQueue;
@@ -47,7 +49,7 @@ public class Role implements Serializable {
    private final boolean browse;
 
    public JsonObject toJson() {
-      return JsonLoader.createObjectBuilder().add("name", name).add("send", send).add("consume", consume).add("createDurableQueue", createDurableQueue).add("deleteDurableQueue", deleteDurableQueue).add("createNonDurableQueue", createNonDurableQueue).add("deleteNonDurableQueue", deleteNonDurableQueue).add("manage", manage).add("browse", browse).build();
+      return JsonLoader.createObjectBuilder().add("name", name).add("send", send).add("consume", consume).add("createDurableQueue", createDurableQueue).add("deleteDurableQueue", deleteDurableQueue).add("createNonDurableQueue", createNonDurableQueue).add("deleteNonDurableQueue", deleteNonDurableQueue).add("manage", manage).add("browse", browse).add("createAddress", createAddress).build();
    }
 
    /**
@@ -84,12 +86,28 @@ public class Role implements Serializable {
                final boolean deleteNonDurableQueue,
                final boolean manage,
                final boolean browse) {
+      // This constructor exists for version compatibility on the API. If either createDurableQueue or createNonDurableQueue
+      // is true then createAddress will be true.
+      this(name, send, consume, createDurableQueue, deleteDurableQueue, createNonDurableQueue, deleteNonDurableQueue, manage, browse, createDurableQueue || createNonDurableQueue);
+   }
+
+   public Role(final String name,
+               final boolean send,
+               final boolean consume,
+               final boolean createDurableQueue,
+               final boolean deleteDurableQueue,
+               final boolean createNonDurableQueue,
+               final boolean deleteNonDurableQueue,
+               final boolean manage,
+               final boolean browse,
+               final boolean createAddress) {
       if (name == null) {
          throw new NullPointerException("name is null");
       }
       this.name = name;
       this.send = send;
       this.consume = consume;
+      this.createAddress = createAddress;
       this.createDurableQueue = createDurableQueue;
       this.deleteDurableQueue = deleteDurableQueue;
       this.createNonDurableQueue = createNonDurableQueue;
@@ -110,6 +128,10 @@ public class Role implements Serializable {
       return consume;
    }
 
+   public boolean isCreateAddress() {
+      return createAddress;
+   }
+
    public boolean isCreateDurableQueue() {
       return createDurableQueue;
    }
@@ -136,6 +158,9 @@ public class Role implements Serializable {
       if (consume) {
          stringReturn.append(" consume ");
       }
+      if (createAddress) {
+         stringReturn.append(" createAddress ");
+      }
       if (createDurableQueue) {
          stringReturn.append(" createDurableQueue ");
       }
@@ -174,6 +199,9 @@ public class Role implements Serializable {
       if (consume != role.consume) {
          return false;
       }
+      if (createAddress != role.createAddress) {
+         return false;
+      }
       if (createDurableQueue != role.createDurableQueue) {
          return false;
       }
@@ -208,6 +236,7 @@ public class Role implements Serializable {
       result = name.hashCode();
       result = 31 * result + (send ? 1 : 0);
       result = 31 * result + (consume ? 1 : 0);
+      result = 31 * result + (createAddress ? 1 : 0);
       result = 31 * result + (createDurableQueue ? 1 : 0);
       result = 31 * result + (deleteDurableQueue ? 1 : 0);
       result = 31 * result + (createNonDurableQueue ? 1 : 0);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/SessionContext.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/SessionContext.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/SessionContext.java
index 1f15cc6..79d50c1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/SessionContext.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/remoting/SessionContext.java
@@ -166,6 +166,8 @@ public abstract class SessionContext {
 
    public abstract void deleteQueue(SimpleString queueName) throws ActiveMQException;
 
+   public abstract void createAddress(SimpleString address, boolean multicast) throws ActiveMQException;
+
    public abstract void createQueue(SimpleString address,
                                     SimpleString queueName,
                                     SimpleString filterString,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SecurityFormatter.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SecurityFormatter.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SecurityFormatter.java
index b4fe581..7e9ff32 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SecurityFormatter.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SecurityFormatter.java
@@ -32,7 +32,8 @@ public class SecurityFormatter {
                                           String createNonDurableQueueRoles,
                                           String deleteNonDurableQueueRoles,
                                           String manageRoles,
-                                          String browseRoles) {
+                                          String browseRoles,
+                                          String createAddressRoles) {
       List<String> createDurableQueue = toList(createDurableQueueRoles);
       List<String> deleteDurableQueue = toList(deleteDurableQueueRoles);
       List<String> createNonDurableQueue = toList(createNonDurableQueueRoles);
@@ -41,6 +42,7 @@ public class SecurityFormatter {
       List<String> consume = toList(consumeRoles);
       List<String> manage = toList(manageRoles);
       List<String> browse = toList(browseRoles);
+      List<String> createAddress = toList(createAddressRoles);
 
       Set<String> allRoles = new HashSet<>();
       allRoles.addAll(createDurableQueue);
@@ -51,10 +53,11 @@ public class SecurityFormatter {
       allRoles.addAll(consume);
       allRoles.addAll(manage);
       allRoles.addAll(browse);
+      allRoles.addAll(createAddress);
 
       Set<Role> roles = new HashSet<>(allRoles.size());
       for (String role : allRoles) {
-         roles.add(new Role(role, send.contains(role), consume.contains(role), createDurableQueue.contains(role), deleteDurableQueue.contains(role), createNonDurableQueue.contains(role), deleteNonDurableQueue.contains(role), manageRoles.contains(role), browse.contains(role)));
+         roles.add(new Role(role, send.contains(role), consume.contains(role), createDurableQueue.contains(role), deleteDurableQueue.contains(role), createNonDurableQueue.contains(role), deleteNonDurableQueue.contains(role), manageRoles.contains(role), browse.contains(role), createAddressRoles.contains(role)));
       }
       return roles;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-core-client/src/main/resources/activemq-version.properties
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/resources/activemq-version.properties b/artemis-core-client/src/main/resources/activemq-version.properties
index b6f4af2..a39b422 100644
--- a/artemis-core-client/src/main/resources/activemq-version.properties
+++ b/artemis-core-client/src/main/resources/activemq-version.properties
@@ -20,4 +20,4 @@ activemq.version.minorVersion=${activemq.version.minorVersion}
 activemq.version.microVersion=${activemq.version.microVersion}
 activemq.version.incrementingVersion=${activemq.version.incrementingVersion}
 activemq.version.versionTag=${activemq.version.versionTag}
-activemq.version.compatibleVersionList=121,122,123,124,125,126,127,128
+activemq.version.compatibleVersionList=121,122,123,124,125,126,127,128,129

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
index 4aed49f..37b0a98 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java
@@ -43,13 +43,13 @@ public class ActiveMQDestination implements Destination, Serializable, Reference
     */
    private static final long serialVersionUID = 5027962425462382883L;
 
-   public static final String JMS_QUEUE_ADDRESS_PREFIX = "jms.queue.";
+//   public static final String JMS_QUEUE_ADDRESS_PREFIX = "jms.queue.";
 
-   public static final String JMS_TEMP_QUEUE_ADDRESS_PREFIX = "jms.tempqueue.";
+//   public static final String JMS_TEMP_QUEUE_ADDRESS_PREFIX = "jms.tempqueue.";
 
-   public static final String JMS_TOPIC_ADDRESS_PREFIX = "jms.topic.";
+//   public static final String JMS_TOPIC_ADDRESS_PREFIX = "jms.topic.";
 
-   public static final String JMS_TEMP_TOPIC_ADDRESS_PREFIX = "jms.temptopic.";
+//   public static final String JMS_TEMP_TOPIC_ADDRESS_PREFIX = "jms.temptopic.";
 
    public static final String QUEUE_QUALIFIED_PREFIX = "queue://";
    public static final String TOPIC_QUALIFIED_PREFIX = "topic://";
@@ -98,23 +98,23 @@ public class ActiveMQDestination implements Destination, Serializable, Reference
       }
    }
 
-   public static Destination fromAddress(final String address) {
-      if (address.startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX)) {
-         String name = address.substring(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX.length());
+   public static Destination fromPrefixedName(final String address) {
+      if (address.startsWith(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX)) {
+         String name = address.substring(ActiveMQDestination.QUEUE_QUALIFIED_PREFIX.length());
 
          return createQueue(name);
-      } else if (address.startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX)) {
-         String name = address.substring(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX.length());
+      } else if (address.startsWith(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX)) {
+         String name = address.substring(ActiveMQDestination.TOPIC_QUALIFIED_PREFIX.length());
 
          return createTopic(name);
-      } else if (address.startsWith(ActiveMQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX)) {
-         String name = address.substring(ActiveMQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length());
+      } else if (address.startsWith(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX)) {
+         String name = address.substring(ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX.length());
 
-         return new ActiveMQTemporaryQueue(address, name, null);
-      } else if (address.startsWith(ActiveMQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX)) {
-         String name = address.substring(ActiveMQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length());
+         return new ActiveMQTemporaryQueue(name, name, null);
+      } else if (address.startsWith(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX)) {
+         String name = address.substring(ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX.length());
 
-         return new ActiveMQTemporaryTopic(address, name, null);
+         return new ActiveMQTemporaryTopic(name, name, null);
       } else {
          throw new JMSRuntimeException("Invalid address " + address);
       }
@@ -202,11 +202,11 @@ public class ActiveMQDestination implements Destination, Serializable, Reference
    }
 
    public static SimpleString createQueueAddressFromName(final String name) {
-      return new SimpleString(JMS_QUEUE_ADDRESS_PREFIX + name);
+      return new SimpleString(QUEUE_QUALIFIED_PREFIX + name);
    }
 
    public static SimpleString createTopicAddressFromName(final String name) {
-      return new SimpleString(JMS_TOPIC_ADDRESS_PREFIX + name);
+      return new SimpleString(TOPIC_QUALIFIED_PREFIX + name);
    }
 
    public static ActiveMQQueue createQueue(final String name) {
@@ -218,11 +218,11 @@ public class ActiveMQDestination implements Destination, Serializable, Reference
    }
 
    public static ActiveMQTemporaryQueue createTemporaryQueue(final String name, final ActiveMQSession session) {
-      return new ActiveMQTemporaryQueue(JMS_TEMP_QUEUE_ADDRESS_PREFIX.concat(name), name, session);
+      return new ActiveMQTemporaryQueue(name, name, session);
    }
 
    public static ActiveMQTemporaryQueue createTemporaryQueue(final String name) {
-      return createTemporaryQueue(name, null);
+      return createTemporaryQueue(/*TEMP_QUEUE_QUALIFED_PREFIX + */name, null);
    }
 
    public static ActiveMQTemporaryQueue createTemporaryQueue(final ActiveMQSession session) {
@@ -238,7 +238,7 @@ public class ActiveMQDestination implements Destination, Serializable, Reference
    }
 
    public static ActiveMQTemporaryTopic createTemporaryTopic(String name, final ActiveMQSession session) {
-      return new ActiveMQTemporaryTopic(JMS_TEMP_TOPIC_ADDRESS_PREFIX.concat(name), name, session);
+      return new ActiveMQTemporaryTopic(/*TEMP_TOPIC_QUALIFED_PREFIX + */name, name, session);
    }
 
    public static ActiveMQTemporaryTopic createTemporaryTopic(String name) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java
index 12b1296..283f958 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java
@@ -47,6 +47,11 @@ import org.apache.activemq.artemis.core.message.impl.MessageInternal;
 import org.apache.activemq.artemis.reader.MessageUtil;
 import org.apache.activemq.artemis.utils.UUID;
 
+import static org.apache.activemq.artemis.jms.client.ActiveMQDestination.QUEUE_QUALIFIED_PREFIX;
+import static org.apache.activemq.artemis.jms.client.ActiveMQDestination.TEMP_QUEUE_QUALIFED_PREFIX;
+import static org.apache.activemq.artemis.jms.client.ActiveMQDestination.TEMP_TOPIC_QUALIFED_PREFIX;
+import static org.apache.activemq.artemis.jms.client.ActiveMQDestination.TOPIC_QUALIFIED_PREFIX;
+
 /**
  * ActiveMQ Artemis implementation of a JMS Message.
  * <br>
@@ -196,6 +201,8 @@ public class ActiveMQMessage implements javax.jms.Message {
 
    private long jmsDeliveryTime;
 
+   private boolean fromQueue;
+
    // Constructors --------------------------------------------------
 
    /*
@@ -353,7 +360,7 @@ public class ActiveMQMessage implements javax.jms.Message {
          SimpleString repl = MessageUtil.getJMSReplyTo(message);
 
          if (repl != null) {
-            replyTo = ActiveMQDestination.fromAddress(repl.toString());
+            replyTo = ActiveMQDestination.fromPrefixedName(repl.toString());
          }
       }
       return replyTo;
@@ -370,9 +377,19 @@ public class ActiveMQMessage implements javax.jms.Message {
             throw new InvalidDestinationException("Foreign destination " + dest);
          }
 
+         String prefix = "";
+         if (dest instanceof ActiveMQTemporaryQueue) {
+            prefix = TEMP_QUEUE_QUALIFED_PREFIX;
+         } else if (dest instanceof ActiveMQQueue) {
+            prefix = QUEUE_QUALIFIED_PREFIX;
+         } else if (dest instanceof ActiveMQTemporaryTopic) {
+            prefix = TEMP_TOPIC_QUALIFED_PREFIX;
+         } else if (dest instanceof ActiveMQTopic) {
+            prefix = TOPIC_QUALIFIED_PREFIX;
+         }
          ActiveMQDestination jbd = (ActiveMQDestination) dest;
 
-         MessageUtil.setJMSReplyTo(message, jbd.getSimpleAddress());
+         MessageUtil.setJMSReplyTo(message, SimpleString.toSimpleString(prefix + jbd.getAddress()));
 
          replyTo = jbd;
       }
@@ -381,9 +398,9 @@ public class ActiveMQMessage implements javax.jms.Message {
    @Override
    public Destination getJMSDestination() throws JMSException {
       if (dest == null) {
-         SimpleString sdest = message.getAddress();
+         SimpleString address = message.getAddress();
 
-         dest = sdest == null ? null : ActiveMQDestination.fromAddress(sdest.toString());
+         dest = address == null ? null : ActiveMQDestination.fromPrefixedName((fromQueue ? QUEUE_QUALIFIED_PREFIX : TOPIC_QUALIFIED_PREFIX) + address.toString());
       }
 
       return dest;
@@ -762,6 +779,10 @@ public class ActiveMQMessage implements javax.jms.Message {
 
    // Public --------------------------------------------------------
 
+   public void setFromQueue(boolean fromQueue) {
+      this.fromQueue = fromQueue;
+   }
+
    public void setIndividualAcknowledge() {
       this.individualAck = true;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java
index 8bc1fd8..b449aea 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java
@@ -240,6 +240,8 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr
             } else {
                coreMessage.acknowledge();
             }
+
+            jmsMsg.setFromQueue(destination instanceof ActiveMQQueue);
          }
 
          return jmsMsg;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
index 270cc9f..c552d69 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java
@@ -403,9 +403,19 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To
             try {
                ClientSession.AddressQuery query = clientSession.addressQuery(address);
 
-               // if it's autoCreateJMSQueue we will let the PostOffice.route to execute the creation at the server's side
-               // as that's a more efficient path for such operation
-               if (!query.isExists() && ((address.toString().startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX) && !query.isAutoCreateJmsQueues()) || (address.toString().startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX) && !query.isAutoCreateJmsTopics()))) {
+               if (!query.isExists() && query.isAutoCreateJmsQueues()) {
+                  if (destination.isQueue() && !destination.isTemporary()) {
+                     clientSession.createAddress(address, false);
+                     clientSession.createQueue(address, address, null, true);
+                  } else if (destination.isQueue() && destination.isTemporary()) {
+                     clientSession.createAddress(address, false);
+                     clientSession.createTemporaryQueue(address, address);
+                  } else if (!destination.isQueue() && !destination.isTemporary()) {
+                     clientSession.createAddress(address, true);
+                  } else if (!destination.isQueue() && destination.isTemporary()) {
+                     clientSession.createAddress(address, true);
+                  }
+               } else if (!query.isExists() && !query.isAutoCreateJmsQueues()) {
                   throw new InvalidDestinationException("Destination " + address + " does not exist");
                } else {
                   connection.addKnownDestination(address);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java
index c7a5728..2632dae 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java
@@ -33,7 +33,7 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue {
    // Static --------------------------------------------------------
 
    public static SimpleString createAddressFromName(final String name) {
-      return new SimpleString(JMS_QUEUE_ADDRESS_PREFIX + name);
+      return new SimpleString(name);
    }
 
    // Attributes ----------------------------------------------------
@@ -41,11 +41,11 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue {
    // Constructors --------------------------------------------------
 
    public ActiveMQQueue(final String name) {
-      super(JMS_QUEUE_ADDRESS_PREFIX + name, name, false, true, null);
+      super(name, name, false, true, null);
    }
 
    public ActiveMQQueue(final String name, boolean temporary) {
-      super(JMS_QUEUE_ADDRESS_PREFIX + name, name, temporary, true, null);
+      super(name, name, temporary, true, null);
    }
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
index 47d1512..d40ca21 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
@@ -299,7 +299,15 @@ public class ActiveMQSession implements QueueSession, TopicSession {
          if (jbd != null) {
             ClientSession.AddressQuery response = session.addressQuery(jbd.getSimpleAddress());
 
-            if (!response.isExists() && ((jbd.getAddress().startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX) && !response.isAutoCreateJmsQueues()) || (jbd.getAddress().startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX) && !response.isAutoCreateJmsTopics()))) {
+            if (!response.isExists() && response.isAutoCreateJmsQueues()) {
+               if (jbd.isQueue()) {
+                  session.createAddress(jbd.getSimpleAddress(), false);
+                  session.createQueue(jbd.getSimpleAddress(), jbd.getSimpleAddress(), null, true);
+               } else {
+                  session.createAddress(jbd.getSimpleAddress(), true);
+               }
+
+            } else if (!response.isExists() && !response.isAutoCreateJmsQueues()) {
                throw new InvalidDestinationException("Destination " + jbd.getName() + " does not exist");
             }
 
@@ -559,7 +567,7 @@ public class ActiveMQSession implements QueueSession, TopicSession {
 
          AddressQuery response = session.addressQuery(dest.getSimpleAddress());
 
-         if (!response.isExists()) {
+         if (!response.isExists() && !response.isAutoCreateJmsTopics()) {
             throw ActiveMQJMSClientBundle.BUNDLE.destinationDoesNotExist(dest.getSimpleAddress());
          }
 
@@ -652,8 +660,12 @@ public class ActiveMQSession implements QueueSession, TopicSession {
          } else {
             AddressQuery response = session.addressQuery(dest.getSimpleAddress());
 
-            if (!response.isExists() && !response.isAutoCreateJmsTopics()) {
-               throw new InvalidDestinationException("Topic " + dest.getName() + " does not exist");
+            if (!response.isExists()) {
+               if (response.isAutoCreateJmsQueues()) {
+                  session.createAddress(dest.getSimpleAddress(), true);
+               } else {
+                  throw new InvalidDestinationException("Topic " + dest.getName() + " does not exist");
+               }
             }
 
             connection.addKnownDestination(dest.getSimpleAddress());
@@ -774,26 +786,26 @@ public class ActiveMQSession implements QueueSession, TopicSession {
          throw JMSExceptionHelper.convertFromActiveMQException(ActiveMQJMSClientBundle.BUNDLE.invalidFilter(e, new SimpleString(filterString)));
       }
 
-      ActiveMQDestination jbq = (ActiveMQDestination) queue;
+      ActiveMQDestination activeMQDestination = (ActiveMQDestination) queue;
 
-      if (!jbq.isQueue()) {
+      if (!activeMQDestination.isQueue()) {
          throw new InvalidDestinationException("Cannot create a browser on a topic");
       }
 
       try {
-         AddressQuery response = session.addressQuery(new SimpleString(jbq.getAddress()));
+         AddressQuery response = session.addressQuery(new SimpleString(activeMQDestination.getAddress()));
          if (!response.isExists()) {
             if (response.isAutoCreateJmsQueues()) {
-               session.createQueue(jbq.getSimpleAddress(), jbq.getSimpleAddress(), true);
+               session.createQueue(activeMQDestination.getSimpleAddress(), activeMQDestination.getSimpleAddress(), true);
             } else {
-               throw new InvalidDestinationException("Destination " + jbq.getName() + " does not exist");
+               throw new InvalidDestinationException("Destination " + activeMQDestination.getName() + " does not exist");
             }
          }
       } catch (ActiveMQException e) {
          throw JMSExceptionHelper.convertFromActiveMQException(e);
       }
 
-      return new ActiveMQQueueBrowser(options, (ActiveMQQueue) jbq, filterString, session);
+      return new ActiveMQQueueBrowser(options, (ActiveMQQueue) activeMQDestination, filterString, session);
 
    }
 
@@ -1082,7 +1094,7 @@ public class ActiveMQSession implements QueueSession, TopicSession {
 
       AddressQuery query = session.addressQuery(topic.getSimpleAddress());
 
-      if (!query.isExists() && !query.isAutoCreateJmsTopics()) {
+      if (!query.isExists() && !query.isAutoCreateJmsQueues()) {
          return null;
       } else {
          return topic;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
----------------------------------------------------------------------
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
index 14f4e50..5ffd918 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java
@@ -32,7 +32,7 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic {
    // Static --------------------------------------------------------
 
    public static SimpleString createAddressFromName(final String name) {
-      return new SimpleString(JMS_TOPIC_ADDRESS_PREFIX + name);
+      return new SimpleString(name);
    }
 
    // Attributes ----------------------------------------------------
@@ -44,7 +44,7 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic {
    }
 
    public ActiveMQTopic(final String name, boolean temporary) {
-      super(JMS_TOPIC_ADDRESS_PREFIX + name, name, temporary, false, null);
+      super(name, name, temporary, false, null);
    }
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java
index 974d8fb..e9e2f3c 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.artemis.jms.management.impl;
 
-import javax.jms.JMSRuntimeException;
 import javax.json.JsonArray;
 import javax.json.JsonArrayBuilder;
 import javax.json.JsonObject;
@@ -38,6 +37,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.management.Parameter;
@@ -52,11 +52,12 @@ import org.apache.activemq.artemis.core.client.impl.TopologyMemberImpl;
 import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.management.impl.AbstractControl;
 import org.apache.activemq.artemis.core.management.impl.MBeanInfoHelper;
+import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.ServerConsumer;
 import org.apache.activemq.artemis.core.server.ServerSession;
 import org.apache.activemq.artemis.core.server.cluster.ClusterConnection;
 import org.apache.activemq.artemis.core.server.cluster.ClusterManager;
-import org.apache.activemq.artemis.jms.client.ActiveMQDestination;
+import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.jms.server.ActiveMQJMSServerLogger;
 import org.apache.activemq.artemis.jms.server.JMSServerManager;
 import org.apache.activemq.artemis.jms.server.config.ConnectionFactoryConfiguration;
@@ -101,28 +102,6 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo
       return trimmed;
    }
 
-   private static String[] determineJMSDestination(String coreAddress) {
-      String[] result = new String[2]; // destination name & type
-      if (coreAddress.startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX)) {
-         result[0] = coreAddress.substring(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX.length());
-         result[1] = "queue";
-      } else if (coreAddress.startsWith(ActiveMQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX)) {
-         result[0] = coreAddress.substring(ActiveMQDestination.JMS_TEMP_QUEUE_ADDRESS_PREFIX.length());
-         result[1] = "tempqueue";
-      } else if (coreAddress.startsWith(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX)) {
-         result[0] = coreAddress.substring(ActiveMQDestination.JMS_TOPIC_ADDRESS_PREFIX.length());
-         result[1] = "topic";
-      } else if (coreAddress.startsWith(ActiveMQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX)) {
-         result[0] = coreAddress.substring(ActiveMQDestination.JMS_TEMP_TOPIC_ADDRESS_PREFIX.length());
-         result[1] = "temptopic";
-      } else {
-         ActiveMQJMSServerLogger.LOGGER.debug("JMSServerControlImpl.determineJMSDestination()" + coreAddress);
-         // not related to JMS
-         return null;
-      }
-      return result;
-   }
-
    public static MBeanNotificationInfo[] getNotificationInfos() {
       JMSNotificationType[] values = JMSNotificationType.values();
       String[] names = new String[values.length];
@@ -822,24 +801,45 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo
       return server.getActiveMQServer().destroyConnectionWithSessionMetadata(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY, clientID);
    }
 
+   private String determineJMSDestinationType(Queue queue) {
+      String result;
+      if (server.getActiveMQServer().getAddressInfo(SimpleString.toSimpleString(queue.getAddress().toString())).getRoutingType() == AddressInfo.RoutingType.ANYCAST) {
+         if (queue.isTemporary()) {
+            result = "tempqueue";
+         } else {
+            result = "queue";
+         }
+      } else if (server.getActiveMQServer().getAddressInfo(SimpleString.toSimpleString(queue.getAddress().toString())).getRoutingType() == AddressInfo.RoutingType.MULTICAST) {
+         if (queue.isTemporary()) {
+            result = "temptopic";
+         } else {
+            result = "topic";
+         }
+      } else {
+         ActiveMQJMSServerLogger.LOGGER.debug("JMSServerControlImpl.determineJMSDestinationType() " + queue);
+         // not related to JMS
+         return null;
+      }
+      return result;
+   }
+
    private JsonObject toJSONObject(ServerConsumer consumer) {
-      String[] destinationInfo = determineJMSDestination(consumer.getQueue().getAddress().toString());
-      if (destinationInfo == null) {
+      AddressInfo addressInfo = server.getActiveMQServer().getAddressInfo(SimpleString.toSimpleString(consumer.getQueue().getAddress().toString()));
+      if (addressInfo == null) {
          return null;
       }
-      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("consumerID", consumer.getID()).add("connectionID", consumer.getConnectionID().toString()).add("sessionID", consumer.getSessionID()).add("queueName", consumer.getQueue().getName().toString()).add("browseOnly", consumer.isBrowseOnly()).add("creationTime", consumer.getCreationTime()).add("destinationName", destinationInfo[0]).add("destinationType", destinationInfo[1]);
+      JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("consumerID", consumer.getID()).add("connectionID", consumer.getConnectionID().toString()).add("sessionID", consumer.getSessionID()).add("queueName", consumer.getQueue().getName().toString()).add("browseOnly", consumer.isBrowseOnly()).add("creationTime", consumer.getCreationTime()).add("destinationName", consumer.getQueue().getAddress().toString()).add("destinationType", determineJMSDestinationType(consumer.getQueue()));
       // JMS consumer with message filter use the queue's filter
       Filter queueFilter = consumer.getQueue().getFilter();
       if (queueFilter != null) {
          obj.add("filter", queueFilter.getFilterString().toString());
       }
 
-      if (destinationInfo[1].equals("topic")) {
-         try {
-            ActiveMQDestination.decomposeQueueNameForDurableSubscription(consumer.getQueue().getName().toString());
-            obj.add("durable", true);
-         } catch (IllegalArgumentException | JMSRuntimeException e) {
+      if (addressInfo.getRoutingType().equals(AddressInfo.RoutingType.MULTICAST)) {
+         if (consumer.getQueue().isTemporary()) {
             obj.add("durable", false);
+         } else {
+            obj.add("durable", true);
          }
       } else {
          obj.add("durable", false);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3ac7a0c5/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java
index cd8e4e0..f60f526 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java
@@ -297,16 +297,16 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl {
             String clientID = null;
             String subName = null;
 
-            if (queue.isDurable() && !queue.getName().startsWith(ResourceNames.JMS_TOPIC)) {
+            if (queue.isDurable()) {
                Pair<String, String> pair = ActiveMQDestination.decomposeQueueNameForDurableSubscription(queue.getName());
                clientID = pair.getA();
                subName = pair.getB();
-            } else if (queue.getName().startsWith(ResourceNames.JMS_TOPIC)) {
+            } else {
                // in the case of heirarchical topics the queue name will not follow the <part>.<part> pattern of normal
                // durable subscribers so skip decomposing the name for the client ID and subscription name and just
                // hard-code it
-               clientID = "ActiveMQ";
-               subName = "ActiveMQ";
+               clientID = "";
+               subName = "";
             }
 
             String filter = queue.getFilter() != null ? queue.getFilter() : null;


Mime
View raw message