activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [27/50] [abbrv] activemq-artemis git commit: ARTEMIS-789 Fix various failing tests due to addressing changes
Date Fri, 09 Dec 2016 19:49:11 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index c38b2cf..f524062 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -67,7 +67,6 @@ import org.apache.activemq.artemis.core.postoffice.Binding;
 import org.apache.activemq.artemis.core.postoffice.Bindings;
 import org.apache.activemq.artemis.core.postoffice.DuplicateIDCache;
 import org.apache.activemq.artemis.core.postoffice.PostOffice;
-import org.apache.activemq.artemis.core.postoffice.QueueBinding;
 import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
 import org.apache.activemq.artemis.core.remoting.server.RemotingService;
 import org.apache.activemq.artemis.core.security.CheckType;
@@ -75,7 +74,6 @@ import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
-import org.apache.activemq.artemis.core.server.BindingQueryResult;
 import org.apache.activemq.artemis.core.server.ConnectorServiceFactory;
 import org.apache.activemq.artemis.core.server.Consumer;
 import org.apache.activemq.artemis.core.server.JournalType;
@@ -789,12 +787,18 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
 
    @Override
    public String getAddressInfo(String address) throws ActiveMQAddressDoesNotExistException {
-      AddressInfo addressInfo = server.getAddressInfo(SimpleString.toSimpleString(address));
-      if (addressInfo == null) {
-         throw ActiveMQMessageBundle.BUNDLE.addressDoesNotExist(SimpleString.toSimpleString(address));
-      }
-      else {
-         return addressInfo.toString();
+      checkStarted();
+
+      clearIO();
+      try {
+         AddressInfo addressInfo = server.getAddressInfo(SimpleString.toSimpleString(address));
+         if (addressInfo == null) {
+            throw ActiveMQMessageBundle.BUNDLE.addressDoesNotExist(SimpleString.toSimpleString(address));
+         } else {
+            return addressInfo.toString();
+         }
+      } finally {
+         blockOnIO();
       }
    }
 
@@ -1600,7 +1604,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
                                    final String deleteNonDurableQueueRoles,
                                    final String manageRoles,
                                    final String browseRoles) throws Exception {
-      addSecuritySettings(addressMatch, sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createNonDurableQueueRoles, deleteNonDurableQueueRoles, manageRoles, browseRoles, "");
+      addSecuritySettings(addressMatch, sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createNonDurableQueueRoles, deleteNonDurableQueueRoles, manageRoles, browseRoles, "", "");
    }
 
    @Override
@@ -1613,16 +1617,17 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
                                    final String deleteNonDurableQueueRoles,
                                    final String manageRoles,
                                    final String browseRoles,
-                                   final String createAddressRoles) throws Exception {
+                                   final String createAddressRoles,
+                                   final String deleteAddressRoles) throws Exception {
       checkStarted();
 
       clearIO();
       try {
-         Set<Role> roles = SecurityFormatter.createSecurity(sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createNonDurableQueueRoles, deleteNonDurableQueueRoles, manageRoles, browseRoles, createAddressRoles);
+         Set<Role> roles = SecurityFormatter.createSecurity(sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createNonDurableQueueRoles, deleteNonDurableQueueRoles, manageRoles, browseRoles, createAddressRoles, deleteAddressRoles);
 
          server.getSecurityRepository().addMatch(addressMatch, roles);
 
-         PersistedRoles persistedRoles = new PersistedRoles(addressMatch, sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createNonDurableQueueRoles, deleteNonDurableQueueRoles, manageRoles, browseRoles, createAddressRoles);
+         PersistedRoles persistedRoles = new PersistedRoles(addressMatch, sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createNonDurableQueueRoles, deleteNonDurableQueueRoles, manageRoles, browseRoles, createAddressRoles, deleteAddressRoles);
 
          storageManager.storeSecurityRoles(persistedRoles);
       } finally {
@@ -1697,7 +1702,31 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
       if (addressSettings.getExpiryAddress() != null) {
          settings.add("expiryAddress", addressSettings.getExpiryAddress().toString());
       }
-      return settings.add("expiryDelay", addressSettings.getExpiryDelay()).add("maxDeliveryAttempts", addressSettings.getMaxDeliveryAttempts()).add("pageCacheMaxSize", addressSettings.getPageCacheMaxSize()).add("maxSizeBytes", addressSettings.getMaxSizeBytes()).add("pageSizeBytes", addressSettings.getPageSizeBytes()).add("redeliveryDelay", addressSettings.getRedeliveryDelay()).add("redeliveryMultiplier", addressSettings.getRedeliveryMultiplier()).add("maxRedeliveryDelay", addressSettings.getMaxRedeliveryDelay()).add("redistributionDelay", addressSettings.getRedistributionDelay()).add("lastValueQueue", addressSettings.isLastValueQueue()).add("sendToDLAOnNoRoute", addressSettings.isSendToDLAOnNoRoute()).add("addressFullMessagePolicy", policy).add("slowConsumerThreshold", addressSettings.getSlowConsumerThreshold()).add("slowConsumerCheckPeriod", addressSettings.getSlowConsumerCheckPeriod()).add("slowConsumerPolicy", consumerPolicy).add("autoCreateJmsQueues", addressSettings.isAutoCreat
 eJmsQueues()).add("autoCreateJmsTopics", addressSettings.isAutoCreateJmsTopics()).add("autoDeleteJmsQueues", addressSettings.getAutoDeleteJmsQueues()).add("autoDeleteJmsTopics", addressSettings.getAutoDeleteJmsQueues()).build().toString();
+      return settings.add("expiryDelay", addressSettings.getExpiryDelay())
+                     .add("maxDeliveryAttempts", addressSettings.getMaxDeliveryAttempts())
+                     .add("pageCacheMaxSize", addressSettings.getPageCacheMaxSize())
+                     .add("maxSizeBytes", addressSettings.getMaxSizeBytes())
+                     .add("pageSizeBytes", addressSettings.getPageSizeBytes())
+                     .add("redeliveryDelay", addressSettings.getRedeliveryDelay())
+                     .add("redeliveryMultiplier", addressSettings.getRedeliveryMultiplier())
+                     .add("maxRedeliveryDelay", addressSettings.getMaxRedeliveryDelay())
+                     .add("redistributionDelay", addressSettings.getRedistributionDelay())
+                     .add("lastValueQueue", addressSettings.isLastValueQueue())
+                     .add("sendToDLAOnNoRoute", addressSettings.isSendToDLAOnNoRoute())
+                     .add("addressFullMessagePolicy", policy)
+                     .add("slowConsumerThreshold", addressSettings.getSlowConsumerThreshold())
+                     .add("slowConsumerCheckPeriod", addressSettings.getSlowConsumerCheckPeriod())
+                     .add("slowConsumerPolicy", consumerPolicy)
+                     .add("autoCreateJmsQueues", addressSettings.isAutoCreateJmsQueues())
+                     .add("autoCreateJmsTopics", addressSettings.isAutoCreateJmsTopics())
+                     .add("autoDeleteJmsQueues", addressSettings.isAutoDeleteJmsQueues())
+                     .add("autoDeleteJmsTopics", addressSettings.isAutoDeleteJmsQueues())
+                     .add("autoCreateQueues", addressSettings.isAutoCreateQueues())
+                     .add("autoDeleteQueues", addressSettings.isAutoDeleteQueues())
+                     .add("autoCreateAddress", addressSettings.isAutoCreateAddresses())
+                     .add("autoDeleteAddress", addressSettings.isAutoDeleteAddresses())
+                     .build()
+                     .toString();
    }
 
    @Override
@@ -1723,6 +1752,36 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
                                   final boolean autoDeleteJmsQueues,
                                   final boolean autoCreateJmsTopics,
                                   final boolean autoDeleteJmsTopics) throws Exception {
+      addAddressSettings(address, DLA, expiryAddress, expiryDelay, lastValueQueue, deliveryAttempts, maxSizeBytes, pageSizeBytes, pageMaxCacheSize, redeliveryDelay, redeliveryMultiplier, maxRedeliveryDelay, redistributionDelay, sendToDLAOnNoRoute, addressFullMessagePolicy, slowConsumerThreshold, slowConsumerCheckPeriod, slowConsumerPolicy, autoCreateJmsQueues, autoDeleteJmsQueues, autoCreateJmsTopics, autoDeleteJmsTopics, AddressSettings.DEFAULT_AUTO_CREATE_QUEUES, AddressSettings.DEFAULT_AUTO_DELETE_QUEUES, AddressSettings.DEFAULT_AUTO_CREATE_ADDRESSES, AddressSettings.DEFAULT_AUTO_DELETE_ADDRESSES);
+   }
+
+   @Override
+   public void addAddressSettings(final String address,
+                                  final String DLA,
+                                  final String expiryAddress,
+                                  final long expiryDelay,
+                                  final boolean lastValueQueue,
+                                  final int deliveryAttempts,
+                                  final long maxSizeBytes,
+                                  final int pageSizeBytes,
+                                  final int pageMaxCacheSize,
+                                  final long redeliveryDelay,
+                                  final double redeliveryMultiplier,
+                                  final long maxRedeliveryDelay,
+                                  final long redistributionDelay,
+                                  final boolean sendToDLAOnNoRoute,
+                                  final String addressFullMessagePolicy,
+                                  final long slowConsumerThreshold,
+                                  final long slowConsumerCheckPeriod,
+                                  final String slowConsumerPolicy,
+                                  final boolean autoCreateJmsQueues,
+                                  final boolean autoDeleteJmsQueues,
+                                  final boolean autoCreateJmsTopics,
+                                  final boolean autoDeleteJmsTopics,
+                                  final boolean autoCreateQueues,
+                                  final boolean autoDeleteQueues,
+                                  final boolean autoCreateAddresses,
+                                  final boolean autoDeleteAddresses) throws Exception {
       checkStarted();
 
       // JBPAPP-6334 requested this to be pageSizeBytes > maxSizeBytes
@@ -1770,6 +1829,12 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
       }
       addressSettings.setAutoCreateJmsQueues(autoCreateJmsQueues);
       addressSettings.setAutoDeleteJmsQueues(autoDeleteJmsQueues);
+      addressSettings.setAutoCreateJmsTopics(autoCreateJmsTopics);
+      addressSettings.setAutoDeleteJmsTopics(autoDeleteJmsTopics);
+      addressSettings.setAutoCreateQueues(autoCreateQueues);
+      addressSettings.setAutoDeleteQueues(autoDeleteQueues);
+      addressSettings.setAutoCreateAddresses(autoCreateAddresses);
+      addressSettings.setAutoDeleteAddresses(autoDeleteAddresses);
       server.getAddressSettingsRepository().addMatch(address, addressSettings);
 
       storageManager.storeAddressSetting(new PersistedAddressSetting(new SimpleString(address), addressSettings));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/config/PersistedRoles.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/config/PersistedRoles.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/config/PersistedRoles.java
index ffa0dbb..86fdc14 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/config/PersistedRoles.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/config/PersistedRoles.java
@@ -48,6 +48,8 @@ public class PersistedRoles implements EncodingSupport {
 
    private SimpleString createAddressRoles;
 
+   private SimpleString deleteAddressRoles;
+
    // Static --------------------------------------------------------
 
    // Constructors --------------------------------------------------
@@ -65,6 +67,8 @@ public class PersistedRoles implements EncodingSupport {
     * @param deleteNonDurableQueueRoles
     * @param manageRoles
     * @param browseRoles
+    * @param createAddressRoles
+    * @param deleteAddressRoles
     */
    public PersistedRoles(final String addressMatch,
                          final String sendRoles,
@@ -75,7 +79,8 @@ public class PersistedRoles implements EncodingSupport {
                          final String deleteNonDurableQueueRoles,
                          final String manageRoles,
                          final String browseRoles,
-                         final String createAddressRoles) {
+                         final String createAddressRoles,
+                         final String deleteAddressRoles) {
       super();
       this.addressMatch = SimpleString.toSimpleString(addressMatch);
       this.sendRoles = SimpleString.toSimpleString(sendRoles);
@@ -87,6 +92,7 @@ public class PersistedRoles implements EncodingSupport {
       this.manageRoles = SimpleString.toSimpleString(manageRoles);
       this.browseRoles = SimpleString.toSimpleString(browseRoles);
       this.createAddressRoles = SimpleString.toSimpleString(createAddressRoles);
+      this.deleteAddressRoles = SimpleString.toSimpleString(deleteAddressRoles);
    }
 
    // Public --------------------------------------------------------
@@ -169,6 +175,13 @@ public class PersistedRoles implements EncodingSupport {
       return createAddressRoles.toString();
    }
 
+   /**
+    * @return the deleteAddressRoles
+    */
+   public String getDeleteAddressRoles() {
+      return deleteAddressRoles.toString();
+   }
+
    @Override
    public void encode(final ActiveMQBuffer buffer) {
       buffer.writeSimpleString(addressMatch);
@@ -181,6 +194,7 @@ public class PersistedRoles implements EncodingSupport {
       buffer.writeNullableSimpleString(manageRoles);
       buffer.writeNullableSimpleString(browseRoles);
       buffer.writeNullableSimpleString(createAddressRoles);
+      buffer.writeNullableSimpleString(deleteAddressRoles);
    }
 
    @Override
@@ -193,8 +207,8 @@ public class PersistedRoles implements EncodingSupport {
          SimpleString.sizeofNullableString(deleteNonDurableQueueRoles) +
          SimpleString.sizeofNullableString(manageRoles) +
          SimpleString.sizeofNullableString(browseRoles) +
-         SimpleString.sizeofNullableString(createAddressRoles);
-
+         SimpleString.sizeofNullableString(createAddressRoles) +
+         SimpleString.sizeofNullableString(deleteAddressRoles);
    }
 
    @Override
@@ -209,6 +223,7 @@ public class PersistedRoles implements EncodingSupport {
       manageRoles = buffer.readNullableSimpleString();
       browseRoles = buffer.readNullableSimpleString();
       createAddressRoles = buffer.readNullableSimpleString();
+      deleteAddressRoles = buffer.readNullableSimpleString();
    }
 
    /* (non-Javadoc)
@@ -227,6 +242,7 @@ public class PersistedRoles implements EncodingSupport {
       result = prime * result + ((manageRoles == null) ? 0 : manageRoles.hashCode());
       result = prime * result + ((browseRoles == null) ? 0 : browseRoles.hashCode());
       result = prime * result + ((createAddressRoles == null) ? 0 : createAddressRoles.hashCode());
+      result = prime * result + ((deleteAddressRoles == null) ? 0 : deleteAddressRoles.hashCode());
       result = prime * result + ((sendRoles == null) ? 0 : sendRoles.hashCode());
       result = prime * result + (int) (storeId ^ (storeId >>> 32));
       return result;
@@ -289,6 +305,11 @@ public class PersistedRoles implements EncodingSupport {
             return false;
       } else if (!createAddressRoles.equals(other.createAddressRoles))
          return false;
+      if (deleteAddressRoles == null) {
+         if (other.deleteAddressRoles != null)
+            return false;
+      } else if (!deleteAddressRoles.equals(other.deleteAddressRoles))
+         return false;
       if (sendRoles == null) {
          if (other.sendRoles != null)
             return false;
@@ -325,6 +346,8 @@ public class PersistedRoles implements EncodingSupport {
          browseRoles +
          ", createAddressRoles=" +
          createAddressRoles +
+         ", deleteAddressRoles=" +
+         deleteAddressRoles +
          "]";
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
index 12eac9f..b109864 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
@@ -1278,6 +1278,7 @@ public abstract class AbstractJournalStorageManager implements StorageManager {
       try {
          long recordID = idGenerator.generateID();
          bindingEncoding.setId(recordID);
+         addressInfo.setId(recordID);
          bindingsJournal.appendAddRecordTransactional(tx, recordID, JournalRecordIds.ADDRESS_BINDING_RECORD, bindingEncoding);
       } finally {
          readUnLock();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index 3064363..dc73680 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -132,7 +132,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
 
    private final ActiveMQServer server;
 
-   private Object addressLock = new Object();
+   private final Object addressLock = new Object();
 
    public PostOfficeImpl(final ActiveMQServer server,
                          final StorageManager storageManager,
@@ -450,7 +450,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
       synchronized (addressLock) {
          Bindings bindingsForAddress = getBindingsForAddress(address);
          if (bindingsForAddress.getBindings().size() > 0) {
-            throw new IllegalStateException("Address has bindings");
+            throw ActiveMQMessageBundle.BUNDLE.addressHasBindings(address);
          }
          managementService.unregisterAddress(address);
          return addressManager.removeAddressInfo(address);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java
index be71a92..184462b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java
@@ -32,6 +32,7 @@ import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 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.CreateQueueMessage_V2;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSharedQueueMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.NullResponseMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.RollbackMessage;
@@ -85,6 +86,7 @@ import org.jboss.logging.Logger;
 
 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_QUEUE_V2;
 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;
 import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.SESS_ACKNOWLEDGE;
@@ -225,7 +227,7 @@ public class ServerSessionPacketHandler implements ChannelHandler {
                case CREATE_ADDRESS: {
                   CreateAddressMessage request = (CreateAddressMessage) packet;
                   requiresResponse = request.isRequiresResponse();
-                  session.createAddress(request.getAddress(), request.isMulticast());
+                  session.createAddress(request.getAddress(), request.isMulticast(), request.isAutoCreated());
                   if (requiresResponse) {
                      response = new NullResponseMessage();
                   }
@@ -240,6 +242,15 @@ public class ServerSessionPacketHandler implements ChannelHandler {
                   }
                   break;
                }
+               case CREATE_QUEUE_V2: {
+                  CreateQueueMessage_V2 request = (CreateQueueMessage_V2) packet;
+                  requiresResponse = request.isRequiresResponse();
+                  session.createQueue(request.getAddress(), request.getQueueName(), request.getFilterString(), request.isTemporary(), request.isDurable(), null, null, request.isAutoCreated());
+                  if (requiresResponse) {
+                     response = new NullResponseMessage();
+                  }
+                  break;
+               }
                case CREATE_SHARED_QUEUE: {
                   CreateSharedQueueMessage request = (CreateSharedQueueMessage) packet;
                   requiresResponse = request.isRequiresResponse();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
index 833f8ce..143b12e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
@@ -22,7 +22,6 @@ import java.util.Set;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
-import com.google.common.collect.Queues;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.config.BridgeConfiguration;
 import org.apache.activemq.artemis.core.config.Configuration;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java
index 28d283d..23426ca 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java
@@ -108,7 +108,7 @@ public interface ServerSession extends SecurityAuth {
                      boolean temporary,
                      boolean durable) throws Exception;
 
-   AddressInfo createAddress(final SimpleString address, final boolean multicast) throws Exception;
+   AddressInfo createAddress(final SimpleString address, final boolean multicast, final boolean autoCreated) throws Exception;
 
    void deleteQueue(SimpleString name) throws Exception;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index ea72bea..9253e74 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -682,15 +682,14 @@ public class ActiveMQServerImpl implements ActiveMQServer {
       return postOffice.isAddressBound(SimpleString.toSimpleString(address));
    }
 
-   // TODO: this should probably look at the addresses too, not just queue bindings
    @Override
    public BindingQueryResult bindingQuery(SimpleString address) throws Exception {
       if (address == null) {
          throw ActiveMQMessageBundle.BUNDLE.addressIsNull();
       }
 
-      boolean autoCreateJmsQueues = getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateJmsQueues();
-      boolean autoCreateJmsTopics = getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateJmsTopics();
+      boolean autoCreateJmsQueues = getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateQueues();
+      boolean autoCreateJmsTopics = getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateAddresses();
 
       List<SimpleString> names = new ArrayList<>();
 
@@ -710,7 +709,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          }
       }
 
-      return new BindingQueryResult(!names.isEmpty(), names, autoCreateJmsQueues, autoCreateJmsTopics);
+      return new BindingQueryResult(getAddressInfo(address) != null, names, autoCreateJmsQueues, autoCreateJmsTopics);
    }
 
    @Override
@@ -719,7 +718,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          throw ActiveMQMessageBundle.BUNDLE.queueNameIsNull();
       }
 
-      boolean autoCreateJmsQueues = getAddressSettingsRepository().getMatch(name.toString()).isAutoCreateJmsQueues();
+      boolean autoCreateJmsQueues = getAddressSettingsRepository().getMatch(name.toString()).isAutoCreateQueues();
 
       QueueQueryResult response;
 
@@ -1626,7 +1625,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
    public void destroyQueue(final SimpleString queueName,
                             final SecurityAuth session,
                             final boolean checkConsumerCount) throws Exception {
-      destroyQueue(queueName, session, checkConsumerCount, false, true);
+      destroyQueue(queueName, session, checkConsumerCount, false);
    }
 
    @Override
@@ -1678,7 +1677,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
 
       if (autoDeleteAddress && postOffice != null) {
          try {
-            postOffice.removeAddressInfo(address);
+            removeAddressInfo(address);
          } catch (ActiveMQDeleteAddressException e) {
             // Could be thrown if the address has bindings or is not deletable.
          }
@@ -2319,7 +2318,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
       List<PersistedRoles> roles = storageManager.recoverPersistedRoles();
 
       for (PersistedRoles roleItem : roles) {
-         Set<Role> setRoles = SecurityFormatter.createSecurity(roleItem.getSendRoles(), roleItem.getConsumeRoles(), roleItem.getCreateDurableQueueRoles(), roleItem.getDeleteDurableQueueRoles(), roleItem.getCreateNonDurableQueueRoles(), roleItem.getDeleteNonDurableQueueRoles(), roleItem.getManageRoles(), roleItem.getBrowseRoles(), roleItem.getCreateAddressRoles());
+         Set<Role> setRoles = SecurityFormatter.createSecurity(roleItem.getSendRoles(), roleItem.getConsumeRoles(), roleItem.getCreateDurableQueueRoles(), roleItem.getDeleteDurableQueueRoles(), roleItem.getCreateNonDurableQueueRoles(), roleItem.getDeleteNonDurableQueueRoles(), roleItem.getManageRoles(), roleItem.getBrowseRoles(), roleItem.getCreateAddressRoles(), roleItem.getDeleteAddressRoles());
 
          securityRepository.addMatch(roleItem.getAddressMatch().toString(), setRoles);
       }
@@ -2358,15 +2357,15 @@ public class ActiveMQServerImpl implements ActiveMQServer {
 
    @Override
    public void removeAddressInfo(SimpleString address) throws Exception {
+      AddressInfo addressInfo = getAddressInfo(address);
       if (postOffice.removeAddressInfo(address) == null) {
          throw ActiveMQMessageBundle.BUNDLE.addressDoesNotExist(address);
-      };
-
-      // TODO: is this the right way to do this?
-      //      long txID = storageManager.generateID();
-      //      storageManager.deleteAddressBinding(txID, getAddressInfo(address).getID());
-      //      storageManager.commitBindings(txID);
+      }
 
+      // TODO: is this the right way to do this? Should it use a transaction?
+      long txID = storageManager.generateID();
+      storageManager.deleteAddressBinding(txID, addressInfo.getId());
+      storageManager.commitBindings(txID);
    }
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AddressInfo.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AddressInfo.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AddressInfo.java
index a92e8d3..9653a4e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AddressInfo.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AddressInfo.java
@@ -21,6 +21,8 @@ import org.apache.activemq.artemis.api.core.SimpleString;
 
 public class AddressInfo {
 
+   private long id;
+
    private final SimpleString name;
 
    private RoutingType routingType = RoutingType.MULTICAST;
@@ -84,10 +86,19 @@ public class AddressInfo {
       return name;
    }
 
+   public void setId(long id) {
+      this.id = id;
+   }
+
+   public long getId() {
+      return id;
+   }
+
    @Override
    public String toString() {
       StringBuffer buff = new StringBuffer();
       buff.append("Address [name=" + name);
+      buff.append(", id=" + id);
       buff.append(", routingType=" + routingType);
       buff.append(", defaultMaxQueueConsumers=" + defaultMaxQueueConsumers);
       buff.append(", defaultDeleteOnNoConsumers=" + defaultDeleteOnNoConsumers);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
index a211a96..0a1d09c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java
@@ -39,17 +39,15 @@ public class AutoCreatedQueueManagerImpl implements AutoCreatedQueueManager {
          long consumerCount = queue.getConsumerCount();
          long messageCount = queue.getMessageCount();
 
-         // TODO make sure this is the right check
-         if ((queue.isAutoCreated() || queue.isDeleteOnNoConsumers()) && queue.getMessageCount() == 0) {
+         if (((queue.isAutoCreated() && settings.isAutoDeleteQueues()) || queue.isDeleteOnNoConsumers()) && queue.getMessageCount() == 0) {
             if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) {
-               ActiveMQServerLogger.LOGGER.debug("deleting auto-created queue \"" + queueName + ".\" consumerCount = " + consumerCount + "; messageCount = " + messageCount + "; getAutoDeleteJmsQueues = " + settings.getAutoDeleteJmsQueues());
+               ActiveMQServerLogger.LOGGER.debug("deleting " + (queue.isAutoCreated() ? "auto-created " : "") + "queue \"" + queueName + ".\" consumerCount = " + consumerCount + "; messageCount = " + messageCount + "; isAutoDeleteQueues = " + settings.isAutoDeleteQueues());
             }
 
-            // TODO handle this exception better
             try {
                server.destroyQueue(queueName, null, true, false);
             } catch (Exception e) {
-               e.printStackTrace();
+               ActiveMQServerLogger.LOGGER.errorRemovingAutoCreatedQueue(e, queueName);
             }
          }
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
index f6da245..a2be58b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
@@ -367,7 +367,7 @@ public class QueueImpl implements Queue {
 
       this.address = address;
 
-      this.addressInfo = postOffice.getAddressInfo(address);
+      this.addressInfo = postOffice == null ? null : postOffice.getAddressInfo(address);
 
       this.name = name;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
index 88ab0c0..70177f4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
@@ -510,7 +510,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
 
       server.checkQueueCreationLimit(getUsername());
 
-      Queue queue = server.createQueue(address, name, filterString, SimpleString.toSimpleString(getUsername()), durable, temporary, maxConsumers, deleteOnNoConsumers, true);
+      Queue queue = server.createQueue(address, name, filterString, SimpleString.toSimpleString(getUsername()), durable, temporary, autoCreated, maxConsumers, deleteOnNoConsumers, true);
 
       if (temporary) {
          // Temporary queue in core simply means the queue will be deleted if
@@ -541,12 +541,11 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
    }
 
    @Override
-   public AddressInfo createAddress(final SimpleString address, final boolean multicast) throws Exception {
-      // make sure the user has privileges to create this queue
+   public AddressInfo createAddress(final SimpleString address, final boolean multicast, final boolean autoCreated) throws Exception {
       securityCheck(address, CheckType.CREATE_ADDRESS, this);
       AddressInfo.RoutingType routingType = multicast ? AddressInfo.RoutingType.MULTICAST : AddressInfo.RoutingType.ANYCAST;
 
-      AddressInfo addressInfo = server.createOrUpdateAddressInfo(new AddressInfo(address).setRoutingType(routingType));
+      AddressInfo addressInfo = server.createOrUpdateAddressInfo(new AddressInfo(address).setRoutingType(routingType).setAutoCreated(autoCreated));
 
       return addressInfo;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java
index 68d9656..a63ee9b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java
@@ -52,14 +52,26 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
 
    public static final boolean DEFAULT_LAST_VALUE_QUEUE = false;
 
+   @Deprecated
    public static final boolean DEFAULT_AUTO_CREATE_JMS_QUEUES = true;
 
+   @Deprecated
    public static final boolean DEFAULT_AUTO_DELETE_JMS_QUEUES = true;
 
+   @Deprecated
    public static final boolean DEFAULT_AUTO_CREATE_TOPICS = true;
 
+   @Deprecated
    public static final boolean DEFAULT_AUTO_DELETE_TOPICS = true;
 
+   public static final boolean DEFAULT_AUTO_CREATE_QUEUES = true;
+
+   public static final boolean DEFAULT_AUTO_DELETE_QUEUES = true;
+
+   public static final boolean DEFAULT_AUTO_CREATE_ADDRESSES = true;
+
+   public static final boolean DEFAULT_AUTO_DELETE_ADDRESSES = true;
+
    public static final long DEFAULT_REDISTRIBUTION_DELAY = -1;
 
    public static final long DEFAULT_EXPIRY_DELAY = -1;
@@ -125,6 +137,14 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
 
    private Boolean autoDeleteJmsTopics = null;
 
+   private Boolean autoCreateQueues = null;
+
+   private Boolean autoDeleteQueues = null;
+
+   private Boolean autoCreateAddresses = null;
+
+   private Boolean autoDeleteAddresses = null;
+
    private Integer managementBrowsePageSize = AddressSettings.MANAGEMENT_BROWSE_PAGE_SIZE;
 
    private Long maxSizeBytesRejectThreshold = null;
@@ -157,6 +177,10 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
       this.autoDeleteJmsQueues = other.autoDeleteJmsQueues;
       this.autoCreateJmsTopics = other.autoCreateJmsTopics;
       this.autoDeleteJmsTopics = other.autoDeleteJmsTopics;
+      this.autoCreateQueues = other.autoCreateQueues;
+      this.autoDeleteQueues = other.autoDeleteQueues;
+      this.autoCreateAddresses = other.autoCreateAddresses;
+      this.autoDeleteAddresses = other.autoDeleteAddresses;
       this.managementBrowsePageSize = other.managementBrowsePageSize;
       this.queuePrefetch = other.queuePrefetch;
       this.maxSizeBytesRejectThreshold = other.maxSizeBytesRejectThreshold;
@@ -165,42 +189,86 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
    public AddressSettings() {
    }
 
+   @Deprecated
    public boolean isAutoCreateJmsQueues() {
       return autoCreateJmsQueues != null ? autoCreateJmsQueues : AddressSettings.DEFAULT_AUTO_CREATE_JMS_QUEUES;
    }
 
+   @Deprecated
    public AddressSettings setAutoCreateJmsQueues(final boolean autoCreateJmsQueues) {
       this.autoCreateJmsQueues = autoCreateJmsQueues;
       return this;
    }
 
-   public boolean getAutoDeleteJmsQueues() {
+   @Deprecated
+   public boolean isAutoDeleteJmsQueues() {
       return autoDeleteJmsQueues != null ? autoDeleteJmsQueues : AddressSettings.DEFAULT_AUTO_DELETE_JMS_QUEUES;
    }
 
+   @Deprecated
    public AddressSettings setAutoDeleteJmsQueues(final boolean autoDeleteJmsQueues) {
       this.autoDeleteJmsQueues = autoDeleteJmsQueues;
       return this;
    }
 
+   @Deprecated
    public boolean isAutoCreateJmsTopics() {
       return autoCreateJmsTopics != null ? autoCreateJmsTopics : AddressSettings.DEFAULT_AUTO_CREATE_TOPICS;
    }
 
+   @Deprecated
    public AddressSettings setAutoCreateJmsTopics(final boolean autoCreateJmsTopics) {
       this.autoCreateJmsTopics = autoCreateJmsTopics;
       return this;
    }
 
+   @Deprecated
    public boolean isAutoDeleteJmsTopics() {
       return autoDeleteJmsTopics != null ? autoDeleteJmsTopics : AddressSettings.DEFAULT_AUTO_DELETE_TOPICS;
    }
 
+   @Deprecated
    public AddressSettings setAutoDeleteJmsTopics(final boolean autoDeleteJmsTopics) {
       this.autoDeleteJmsTopics = autoDeleteJmsTopics;
       return this;
    }
 
+   public boolean isAutoCreateQueues() {
+      return autoCreateQueues != null ? autoCreateQueues : AddressSettings.DEFAULT_AUTO_CREATE_QUEUES;
+   }
+
+   public AddressSettings setAutoCreateQueues(Boolean autoCreateQueues) {
+      this.autoCreateQueues = autoCreateQueues;
+      return this;
+   }
+
+   public boolean isAutoDeleteQueues() {
+      return autoDeleteQueues != null ? autoDeleteQueues : AddressSettings.DEFAULT_AUTO_DELETE_QUEUES;
+   }
+
+   public AddressSettings setAutoDeleteQueues(Boolean autoDeleteQueues) {
+      this.autoDeleteQueues = autoDeleteQueues;
+      return this;
+   }
+
+   public boolean isAutoCreateAddresses() {
+      return autoCreateAddresses != null ? autoCreateAddresses : AddressSettings.DEFAULT_AUTO_CREATE_ADDRESSES;
+   }
+
+   public AddressSettings setAutoCreateAddresses(Boolean autoCreateAddresses) {
+      this.autoCreateAddresses = autoCreateAddresses;
+      return this;
+   }
+
+   public boolean isAutoDeleteAddresses() {
+      return autoDeleteAddresses != null ? autoDeleteAddresses : AddressSettings.DEFAULT_AUTO_DELETE_ADDRESSES;
+   }
+
+   public AddressSettings setAutoDeleteAddresses(Boolean autoDeleteAddresses) {
+      this.autoDeleteAddresses = autoDeleteAddresses;
+      return this;
+   }
+
    public boolean isLastValueQueue() {
       return lastValueQueue != null ? lastValueQueue : AddressSettings.DEFAULT_LAST_VALUE_QUEUE;
    }
@@ -459,12 +527,24 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
       if (autoDeleteJmsQueues == null) {
          autoDeleteJmsQueues = merged.autoDeleteJmsQueues;
       }
-//      if (autoCreateJmsTopics == null) {
-//         autoCreateJmsTopics = merged.autoCreateJmsTopics;
-//      }
+      if (autoCreateJmsTopics == null) {
+         autoCreateJmsTopics = merged.autoCreateJmsTopics;
+      }
       if (autoDeleteJmsTopics == null) {
          autoDeleteJmsTopics = merged.autoDeleteJmsTopics;
       }
+      if (autoCreateQueues == null) {
+         autoCreateQueues = merged.autoCreateQueues;
+      }
+      if (autoDeleteQueues == null) {
+         autoDeleteQueues = merged.autoDeleteQueues;
+      }
+      if (autoCreateAddresses == null) {
+         autoCreateAddresses = merged.autoCreateAddresses;
+      }
+      if (autoDeleteAddresses == null) {
+         autoDeleteAddresses = merged.autoDeleteAddresses;
+      }
       if (managementBrowsePageSize == null) {
          managementBrowsePageSize = merged.managementBrowsePageSize;
       }
@@ -532,10 +612,18 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
 
       autoDeleteJmsQueues = BufferHelper.readNullableBoolean(buffer);
 
-//      autoCreateJmsTopics = BufferHelper.readNullableBoolean(buffer);
+      autoCreateJmsTopics = BufferHelper.readNullableBoolean(buffer);
 
       autoDeleteJmsTopics = BufferHelper.readNullableBoolean(buffer);
 
+      autoCreateQueues = BufferHelper.readNullableBoolean(buffer);
+
+      autoDeleteQueues = BufferHelper.readNullableBoolean(buffer);
+
+      autoCreateAddresses = BufferHelper.readNullableBoolean(buffer);
+
+      autoDeleteAddresses = BufferHelper.readNullableBoolean(buffer);
+
       managementBrowsePageSize = BufferHelper.readNullableInteger(buffer);
 
       maxSizeBytesRejectThreshold = BufferHelper.readNullableLong(buffer);
@@ -565,8 +653,12 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
          BufferHelper.sizeOfNullableSimpleString(slowConsumerPolicy != null ? slowConsumerPolicy.toString() : null) +
          BufferHelper.sizeOfNullableBoolean(autoCreateJmsQueues) +
          BufferHelper.sizeOfNullableBoolean(autoDeleteJmsQueues) +
-//         BufferHelper.sizeOfNullableBoolean(autoCreateJmsTopics) +
+         BufferHelper.sizeOfNullableBoolean(autoCreateJmsTopics) +
          BufferHelper.sizeOfNullableBoolean(autoDeleteJmsTopics) +
+         BufferHelper.sizeOfNullableBoolean(autoCreateQueues) +
+         BufferHelper.sizeOfNullableBoolean(autoDeleteQueues) +
+         BufferHelper.sizeOfNullableBoolean(autoCreateAddresses) +
+         BufferHelper.sizeOfNullableBoolean(autoDeleteAddresses) +
          BufferHelper.sizeOfNullableInteger(managementBrowsePageSize) +
          BufferHelper.sizeOfNullableLong(maxSizeBytesRejectThreshold);
    }
@@ -615,10 +707,18 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
 
       BufferHelper.writeNullableBoolean(buffer, autoDeleteJmsQueues);
 
-//      BufferHelper.writeNullableBoolean(buffer, autoCreateJmsTopics);
+      BufferHelper.writeNullableBoolean(buffer, autoCreateJmsTopics);
 
       BufferHelper.writeNullableBoolean(buffer, autoDeleteJmsTopics);
 
+      BufferHelper.writeNullableBoolean(buffer, autoCreateQueues);
+
+      BufferHelper.writeNullableBoolean(buffer, autoDeleteQueues);
+
+      BufferHelper.writeNullableBoolean(buffer, autoCreateAddresses);
+
+      BufferHelper.writeNullableBoolean(buffer, autoDeleteAddresses);
+
       BufferHelper.writeNullableInteger(buffer, managementBrowsePageSize);
 
       BufferHelper.writeNullableLong(buffer, maxSizeBytesRejectThreshold);
@@ -652,8 +752,12 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
       result = prime * result + ((slowConsumerPolicy == null) ? 0 : slowConsumerPolicy.hashCode());
       result = prime * result + ((autoCreateJmsQueues == null) ? 0 : autoCreateJmsQueues.hashCode());
       result = prime * result + ((autoDeleteJmsQueues == null) ? 0 : autoDeleteJmsQueues.hashCode());
-//      result = prime * result + ((autoCreateJmsTopics == null) ? 0 : autoCreateJmsTopics.hashCode());
+      result = prime * result + ((autoCreateJmsTopics == null) ? 0 : autoCreateJmsTopics.hashCode());
       result = prime * result + ((autoDeleteJmsTopics == null) ? 0 : autoDeleteJmsTopics.hashCode());
+      result = prime * result + ((autoCreateQueues == null) ? 0 : autoCreateQueues.hashCode());
+      result = prime * result + ((autoDeleteQueues == null) ? 0 : autoDeleteQueues.hashCode());
+      result = prime * result + ((autoCreateAddresses == null) ? 0 : autoCreateAddresses.hashCode());
+      result = prime * result + ((autoDeleteAddresses == null) ? 0 : autoDeleteAddresses.hashCode());
       result = prime * result + ((managementBrowsePageSize == null) ? 0 : managementBrowsePageSize.hashCode());
       result = prime * result + ((queuePrefetch == null) ? 0 : queuePrefetch.hashCode());
       result = prime * result + ((maxSizeBytesRejectThreshold == null) ? 0 : queuePrefetch.hashCode());
@@ -777,18 +881,36 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
             return false;
       } else if (!autoDeleteJmsQueues.equals(other.autoDeleteJmsQueues))
          return false;
-
-//      if (autoCreateJmsTopics == null) {
-//         if (other.autoCreateJmsTopics != null)
-//            return false;
-//      } else if (!autoCreateJmsTopics.equals(other.autoCreateJmsTopics))
-//         return false;
+      if (autoCreateJmsTopics == null) {
+         if (other.autoCreateJmsTopics != null)
+            return false;
+      } else if (!autoCreateJmsTopics.equals(other.autoCreateJmsTopics))
+         return false;
       if (autoDeleteJmsTopics == null) {
          if (other.autoDeleteJmsTopics != null)
             return false;
       } else if (!autoDeleteJmsTopics.equals(other.autoDeleteJmsTopics))
          return false;
-
+      if (autoCreateQueues == null) {
+         if (other.autoCreateQueues != null)
+            return false;
+      } else if (!autoCreateQueues.equals(other.autoCreateQueues))
+         return false;
+      if (autoDeleteQueues == null) {
+         if (other.autoDeleteQueues != null)
+            return false;
+      } else if (!autoDeleteQueues.equals(other.autoDeleteQueues))
+         return false;
+      if (autoCreateAddresses == null) {
+         if (other.autoCreateAddresses != null)
+            return false;
+      } else if (!autoCreateAddresses.equals(other.autoCreateAddresses))
+         return false;
+      if (autoDeleteAddresses == null) {
+         if (other.autoDeleteAddresses != null)
+            return false;
+      } else if (!autoDeleteAddresses.equals(other.autoDeleteAddresses))
+         return false;
       if (managementBrowsePageSize == null) {
          if (other.managementBrowsePageSize != null)
             return false;
@@ -854,11 +976,20 @@ public class AddressSettings implements Mergeable<AddressSettings>, Serializable
          slowConsumerPolicy +
          ", autoCreateJmsQueues=" +
          autoCreateJmsQueues +
-         ", autoDeleteJmsQueues=" + autoDeleteJmsQueues +
+         ", autoDeleteJmsQueues=" +
+         autoDeleteJmsQueues +
          ", autoCreateJmsTopics=" +
-//         autoCreateJmsTopics +
-//         ", autoDeleteJmsTopics=" +
+         autoCreateJmsTopics +
+         ", autoDeleteJmsTopics=" +
          autoDeleteJmsTopics +
+         ", autoCreateQueues=" +
+         autoCreateQueues +
+         ", autoDeleteQueues=" +
+         autoDeleteQueues +
+         ", autoCreateAddresses=" +
+         autoCreateAddresses +
+         ", autoDeleteAddresses=" +
+         autoDeleteAddresses +
          ", managementBrowsePageSize=" +
          managementBrowsePageSize +
          "]";

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/main/resources/schema/artemis-configuration.xsd
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index 3e166fd..5e5f0b9 100644
--- a/artemis-server/src/main/resources/schema/artemis-configuration.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
@@ -2407,7 +2407,7 @@
             <xsd:element name="auto-create-jms-queues" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
                <xsd:annotation>
                   <xsd:documentation>
-                     whether or not to automatically create JMS queues when a producer sends or a consumer connects to a
+                     DEPRECATED: whether or not to automatically create JMS queues when a producer sends or a consumer connects to a
                      queue
                   </xsd:documentation>
                </xsd:annotation>
@@ -2416,7 +2416,7 @@
             <xsd:element name="auto-delete-jms-queues" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
                <xsd:annotation>
                   <xsd:documentation>
-                     whether or not to delete auto-created JMS queues when the queue has 0 consumers and 0 messages
+                     DEPRECATED: whether or not to delete auto-created JMS queues when the queue has 0 consumers and 0 messages
                   </xsd:documentation>
                </xsd:annotation>
             </xsd:element>
@@ -2424,7 +2424,7 @@
             <xsd:element name="auto-create-jms-topics" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
                <xsd:annotation>
                   <xsd:documentation>
-                     whether or not to automatically create JMS topics when a producer sends or a consumer subscribes to
+                     DEPRECATED: whether or not to automatically create JMS topics when a producer sends or a consumer subscribes to
                      a topic
                   </xsd:documentation>
                </xsd:annotation>
@@ -2433,7 +2433,42 @@
             <xsd:element name="auto-delete-jms-topics" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
                <xsd:annotation>
                   <xsd:documentation>
-                     whether or not to delete auto-created JMS topics when the last subscription is closed
+                     DEPRECATED: whether or not to delete auto-created JMS topics when the last subscription is closed
+                  </xsd:documentation>
+               </xsd:annotation>
+            </xsd:element>
+
+            <xsd:element name="auto-create-queues" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
+               <xsd:annotation>
+                  <xsd:documentation>
+                     whether or not to automatically create a queue when a client sends a message to or attempts to consume
+                     a message from a queue
+                  </xsd:documentation>
+               </xsd:annotation>
+            </xsd:element>
+
+            <xsd:element name="auto-delete-queues" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
+               <xsd:annotation>
+                  <xsd:documentation>
+                     whether or not to delete auto-created queues when the queue has 0 consumers and 0 messages
+                  </xsd:documentation>
+               </xsd:annotation>
+            </xsd:element>
+
+            <xsd:element name="auto-create-addresses" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
+               <xsd:annotation>
+                  <xsd:documentation>
+                     whether or not to automatically create addresses when a client sends a message to or attempts to
+                     consume a message from a queue mapped to an address that doesn't exist
+                     a queue
+                  </xsd:documentation>
+               </xsd:annotation>
+            </xsd:element>
+
+            <xsd:element name="auto-delete-addresses" type="xsd:boolean" default="true" maxOccurs="1" minOccurs="0">
+               <xsd:annotation>
+                  <xsd:documentation>
+                     whether or not to delete auto-created addresses when it no longer has any queues
                   </xsd:documentation>
                </xsd:annotation>
             </xsd:element>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
index 3e9865d..a1adb4c 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
@@ -301,7 +301,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
       assertEquals(5, conf.getAddressesSettings().get("a1").getSlowConsumerCheckPeriod());
       assertEquals(SlowConsumerPolicy.NOTIFY, conf.getAddressesSettings().get("a1").getSlowConsumerPolicy());
       assertEquals(true, conf.getAddressesSettings().get("a1").isAutoCreateJmsQueues());
-      assertEquals(true, conf.getAddressesSettings().get("a1").getAutoDeleteJmsQueues());
+      assertEquals(true, conf.getAddressesSettings().get("a1").isAutoDeleteJmsQueues());
       assertEquals(true, conf.getAddressesSettings().get("a1").isAutoCreateJmsTopics());
       assertEquals(true, conf.getAddressesSettings().get("a1").isAutoDeleteJmsTopics());
 
@@ -316,7 +316,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
       assertEquals(15, conf.getAddressesSettings().get("a2").getSlowConsumerCheckPeriod());
       assertEquals(SlowConsumerPolicy.KILL, conf.getAddressesSettings().get("a2").getSlowConsumerPolicy());
       assertEquals(false, conf.getAddressesSettings().get("a2").isAutoCreateJmsQueues());
-      assertEquals(false, conf.getAddressesSettings().get("a2").getAutoDeleteJmsQueues());
+      assertEquals(false, conf.getAddressesSettings().get("a2").isAutoDeleteJmsQueues());
       assertEquals(false, conf.getAddressesSettings().get("a2").isAutoCreateJmsTopics());
       assertEquals(false, conf.getAddressesSettings().get("a2").isAutoDeleteJmsTopics());
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/RoleTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/RoleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/RoleTest.java
index 5274db6..a2b3d44 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/RoleTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/RoleTest.java
@@ -42,7 +42,7 @@ public class RoleTest extends Assert {
 
    @Test
    public void testWriteRole() throws Exception {
-      Role role = new Role("testWriteRole", true, false, false, false, false, false, false, false, false);
+      Role role = new Role("testWriteRole", true, false, false, false, false, false, false, false, false, false);
       Assert.assertTrue(SEND.hasRole(role));
       Assert.assertFalse(CONSUME.hasRole(role));
       Assert.assertFalse(CREATE_DURABLE_QUEUE.hasRole(role));
@@ -56,7 +56,7 @@ public class RoleTest extends Assert {
 
    @Test
    public void testReadRole() throws Exception {
-      Role role = new Role("testReadRole", false, true, false, false, false, false, false, true, false);
+      Role role = new Role("testReadRole", false, true, false, false, false, false, false, true, false, false);
       Assert.assertFalse(SEND.hasRole(role));
       Assert.assertTrue(CONSUME.hasRole(role));
       Assert.assertFalse(CREATE_DURABLE_QUEUE.hasRole(role));
@@ -70,7 +70,7 @@ public class RoleTest extends Assert {
 
    @Test
    public void testCreateRole() throws Exception {
-      Role role = new Role("testCreateRole", false, false, true, false, false, false, false, false, false);
+      Role role = new Role("testCreateRole", false, false, true, false, false, false, false, false, false, false);
       Assert.assertFalse(SEND.hasRole(role));
       Assert.assertFalse(CONSUME.hasRole(role));
       Assert.assertTrue(CREATE_DURABLE_QUEUE.hasRole(role));
@@ -84,7 +84,7 @@ public class RoleTest extends Assert {
 
    @Test
    public void testManageRole() throws Exception {
-      Role role = new Role("testManageRole", false, false, false, false, false, false, true, false, false);
+      Role role = new Role("testManageRole", false, false, false, false, false, false, true, false, false, false);
       Assert.assertFalse(SEND.hasRole(role));
       Assert.assertFalse(CONSUME.hasRole(role));
       Assert.assertFalse(CREATE_DURABLE_QUEUE.hasRole(role));
@@ -98,12 +98,12 @@ public class RoleTest extends Assert {
 
    @Test
    public void testEqualsAndHashcode() throws Exception {
-      Role role = new Role("testEquals", true, true, true, false, false, false, false, false, false);
-      Role sameRole = new Role("testEquals", true, true, true, false, false, false, false, false, false);
-      Role roleWithDifferentName = new Role("notEquals", true, true, true, false, false, false, false, false, false);
-      Role roleWithDifferentRead = new Role("testEquals", false, true, true, false, false, false, false, false, false);
-      Role roleWithDifferentWrite = new Role("testEquals", true, false, true, false, false, false, false, false, false);
-      Role roleWithDifferentCreate = new Role("testEquals", true, true, false, false, false, false, false, false, false);
+      Role role = new Role("testEquals", true, true, true, false, false, false, false, false, false, false);
+      Role sameRole = new Role("testEquals", true, true, true, false, false, false, false, false, false, false);
+      Role roleWithDifferentName = new Role("notEquals", true, true, true, false, false, false, false, false, false, false);
+      Role roleWithDifferentRead = new Role("testEquals", false, true, true, false, false, false, false, false, false, false);
+      Role roleWithDifferentWrite = new Role("testEquals", true, false, true, false, false, false, false, false, false, false);
+      Role roleWithDifferentCreate = new Role("testEquals", true, true, false, false, false, false, false, false, false, false);
 
       Assert.assertTrue(role.equals(role));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/AddressSettingsTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/AddressSettingsTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/AddressSettingsTest.java
index 3861782..6a6ec55 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/AddressSettingsTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/AddressSettingsTest.java
@@ -40,9 +40,13 @@ public class AddressSettingsTest extends ActiveMQTestBase {
       Assert.assertEquals(AddressSettings.DEFAULT_SLOW_CONSUMER_CHECK_PERIOD, addressSettings.getSlowConsumerCheckPeriod());
       Assert.assertEquals(AddressSettings.DEFAULT_SLOW_CONSUMER_POLICY, addressSettings.getSlowConsumerPolicy());
       Assert.assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_JMS_QUEUES, addressSettings.isAutoCreateJmsQueues());
-      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_DELETE_JMS_QUEUES, addressSettings.getAutoDeleteJmsQueues());
-//      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_TOPICS, addressSettings.isAutoCreateJmsTopics());
-//      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_DELETE_TOPICS, addressSettings.isAutoDeleteJmsTopics());
+      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_DELETE_JMS_QUEUES, addressSettings.isAutoDeleteJmsQueues());
+      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_TOPICS, addressSettings.isAutoCreateJmsTopics());
+      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_DELETE_TOPICS, addressSettings.isAutoDeleteJmsTopics());
+      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_QUEUES, addressSettings.isAutoCreateQueues());
+      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_DELETE_QUEUES, addressSettings.isAutoDeleteQueues());
+      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_CREATE_ADDRESSES, addressSettings.isAutoCreateAddresses());
+      Assert.assertEquals(AddressSettings.DEFAULT_AUTO_DELETE_ADDRESSES, addressSettings.isAutoDeleteAddresses());
    }
 
    @Test

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java
index b8678ae..ed272c4 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java
@@ -72,13 +72,13 @@ public class RepositoryTest extends ActiveMQTestBase {
    public void testSingletwo() {
       securityRepository.addMatch("queues.another.aq.*", new HashSet<Role>());
       HashSet<Role> roles = new HashSet<>(2);
-      roles.add(new Role("test1", true, true, true, true, true, true, true, true, true));
-      roles.add(new Role("test2", true, true, true, true, true, true, true, true, true));
+      roles.add(new Role("test1", true, true, true, true, true, true, true, true, true, true));
+      roles.add(new Role("test2", true, true, true, true, true, true, true, true, true, true));
       securityRepository.addMatch("queues.aq", roles);
       HashSet<Role> roles2 = new HashSet<>(2);
-      roles2.add(new Role("test1", true, true, true, true, true, true, true, true, true));
-      roles2.add(new Role("test2", true, true, true, true, true, true, true, true, true));
-      roles2.add(new Role("test3", true, true, true, true, true, true, true, true, true));
+      roles2.add(new Role("test1", true, true, true, true, true, true, true, true, true, true));
+      roles2.add(new Role("test2", true, true, true, true, true, true, true, true, true, true));
+      roles2.add(new Role("test3", true, true, true, true, true, true, true, true, true, true));
       securityRepository.addMatch("queues.another.andanother", roles2);
 
       HashSet<Role> hashSet = securityRepository.getMatch("queues.another.andanother");
@@ -89,8 +89,8 @@ public class RepositoryTest extends ActiveMQTestBase {
    public void testWithoutWildcard() {
       securityRepository.addMatch("queues.1.*", new HashSet<Role>());
       HashSet<Role> roles = new HashSet<>(2);
-      roles.add(new Role("test1", true, true, true, true, true, true, true, true, true));
-      roles.add(new Role("test2", true, true, true, true, true, true, true, true, true));
+      roles.add(new Role("test1", true, true, true, true, true, true, true, true, true, true));
+      roles.add(new Role("test2", true, true, true, true, true, true, true, true, true, true));
       securityRepository.addMatch("queues.2.aq", roles);
       HashSet<Role> hashSet = securityRepository.getMatch("queues.2.aq");
       Assert.assertEquals(hashSet.size(), 2);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
index 70e344e..81829f5 100644
--- a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
+++ b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
@@ -268,6 +268,10 @@
             <auto-delete-jms-queues>true</auto-delete-jms-queues>
             <auto-create-jms-topics>true</auto-create-jms-topics>
             <auto-delete-jms-topics>true</auto-delete-jms-topics>
+            <auto-create-queues>true</auto-create-queues>
+            <auto-delete-queues>true</auto-delete-queues>
+            <auto-create-addresses>true</auto-create-addresses>
+            <auto-delete-addresses>true</auto-delete-addresses>
          </address-setting>
          <address-setting match="a2">
             <dead-letter-address>a2.1</dead-letter-address>
@@ -284,6 +288,10 @@
             <auto-delete-jms-queues>false</auto-delete-jms-queues>
             <auto-create-jms-topics>false</auto-create-jms-topics>
             <auto-delete-jms-topics>false</auto-delete-jms-topics>
+            <auto-create-queues>false</auto-create-queues>
+            <auto-delete-queues>false</auto-delete-queues>
+            <auto-create-addresses>false</auto-create-addresses>
+            <auto-delete-addresses>false</auto-delete-addresses>
          </address-setting>
       </address-settings>
       <resource-limit-settings>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/artemis-tools/pom.xml
----------------------------------------------------------------------
diff --git a/artemis-tools/pom.xml b/artemis-tools/pom.xml
index 9ce22fd..b28f3e5 100644
--- a/artemis-tools/pom.xml
+++ b/artemis-tools/pom.xml
@@ -19,7 +19,7 @@
    <parent>
       <groupId>org.apache.activemq</groupId>
       <artifactId>artemis-pom</artifactId>
-      <version>1.5.0-SNAPSHOT</version>
+      <version>2.0.0-SNAPSHOT</version>
    </parent>
 
    <name>ActiveMQ Artemis Tools</name>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/docs/user-manual/en/queue-attributes.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/queue-attributes.md b/docs/user-manual/en/queue-attributes.md
index 22184aa..7a8fe78 100644
--- a/docs/user-manual/en/queue-attributes.md
+++ b/docs/user-manual/en/queue-attributes.md
@@ -88,6 +88,10 @@ entry that would be found in the `broker.xml` file.
           <slow-consumer-threshold>-1</slow-consumer-threshold>
           <slow-consumer-policy>NOTIFY</slow-consumer-policy>
           <slow-consumer-check-period>5</slow-consumer-check-period>
+          <auto-create-jms-queues>true</auto-create-jms-queues> <!-- DEPRECATED see auto-create-queues>
+          <auto-delete-jms-queues>true</auto-delete-jms-queues> <!-- DEPRECATED see auto-delete-queues>
+          <auto-create-jms-topics>true</auto-create-jms-topics> <!-- DEPRECATED see auto-create-addresses>
+          <auto-delete-jms-topics>true</auto-delete-jms-topics> <!-- DEPRECATED see auto-delete-addresses>
           <auto-create-jms-queues>true</auto-create-jms-queues>
           <auto-delete-jms-queues>true</auto-delete-jms-queues>
           <auto-create-jms-topics>true</auto-create-jms-topics>
@@ -179,18 +183,38 @@ create a JMS queue when a JMS message is sent to a queue whose name fits
 the address `match` (remember, a JMS queue is just a core queue which has
 the same address and queue name) or a JMS consumer tries to connect to a
 queue whose name fits the address `match`. Queues which are auto-created
-are durable, non-temporary, and non-transient. Default is `true`.
+are durable, non-temporary, and non-transient. Default is `true`. This is
+_DEPRECATED_.  See `auto-create-queues`.
 
 `auto-delete-jms-queues`. Whether or not the broker should automatically
 delete auto-created JMS queues when they have both 0 consumers and 0 messages.
-Default is `true`.
+Default is `true`. This is _DEPRECATED_.  See `auto-delete-queues`.
 
 `auto-create-jms-topics`. Whether or not the broker should automatically
 create a JMS topic when a JMS message is sent to a topic whose name fits
 the address `match` (remember, a JMS topic is just a core address which has 
 one or more core queues mapped to it) or a JMS consumer tries to subscribe
-to a topic whose name fits the address `match`. Default is `true`.
+to a topic whose name fits the address `match`. Default is `true`. This is
+_DEPRECATED_.  See `auto-create-addresses`.
 
 `auto-delete-jms-topics`. Whether or not the broker should automatically
 delete auto-created JMS topics once the last subscription on the topic has
-been closed. Default is `true`.
+been closed. Default is `true`. This is _DEPRECATED_.  See `auto-delete-addresses`.
+
+`auto-create-queues`. Whether or not the broker should automatically
+create a queue when a message is sent or a consumer tries to connect to a
+queue whose name fits the address `match`. Queues which are auto-created
+are durable, non-temporary, and non-transient. Default is `true`.
+
+`auto-delete-queues`. Whether or not the broker should automatically
+delete auto-created queues when they have both 0 consumers and 0 messages.
+Default is `true`.
+
+`auto-create-addresses`. Whether or not the broker should automatically
+create an address when a message is sent to or a consumer tries to consume
+from a queue which is mapped to an address whose name fits the address `match`.
+Default is `true`.
+
+`auto-delete-addresses`. Whether or not the broker should automatically
+delete auto-created addresses once the address no longer has any queues.
+Default is `true`.

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-durable-subscription/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-durable-subscription/readme.html b/examples/features/clustered/clustered-durable-subscription/readme.html
index d50b2b2..c0a7b2e 100644
--- a/examples/features/clustered/clustered-durable-subscription/readme.html
+++ b/examples/features/clustered/clustered-durable-subscription/readme.html
@@ -50,7 +50,6 @@ under the License.
      <p>The cli create method will define this section by default if you use --clustered as a parameter</p>
      <pre class="prettyprint">
      <code>&lt;cluster-connection name="my-cluster"&gt;
-        &lt;address&gt;jms&lt;/address&gt;
         &lt;retry-interval&gt;500&lt;/retry-interval&gt;
         &lt;use-duplicate-detection&gt;true&lt;/use-duplicate-detection&gt;
         &lt;message-load-balancing&gt;STRICT&lt;/message-load-balancing&gt;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-durable-subscription/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredDurableSubscriptionExample.java
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-durable-subscription/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredDurableSubscriptionExample.java b/examples/features/clustered/clustered-durable-subscription/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredDurableSubscriptionExample.java
index 7935ce5..d9e61e7 100644
--- a/examples/features/clustered/clustered-durable-subscription/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredDurableSubscriptionExample.java
+++ b/examples/features/clustered/clustered-durable-subscription/src/main/java/org/apache/activemq/artemis/jms/example/ClusteredDurableSubscriptionExample.java
@@ -124,6 +124,8 @@ public class ClusteredDurableSubscriptionExample {
          if (connection1 != null) {
             connection1.close();
          }
+
+         Thread.sleep(1000);
       }
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server0/broker.xml
index 2bfaeae..880c184 100644
--- a/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server0/broker.xml
@@ -68,7 +68,6 @@ under the License.
 
       <cluster-connections>
          <cluster-connection name="my-cluster">
-            <address>jms</address>
             <connector-ref>netty-connector</connector-ref>
             <retry-interval>500</retry-interval>
             <use-duplicate-detection>true</use-duplicate-detection>
@@ -82,7 +81,7 @@ under the License.
 
       <security-settings>
          <!--security for example queue-->
-         <security-setting match="jms.topic.exampleTopic">
+         <security-setting match="exampleTopic">
             <permission type="createDurableQueue" roles="guest"/>
             <permission type="deleteDurableQueue" roles="guest"/>
             <permission type="createNonDurableQueue" roles="guest"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server1/broker.xml
index 8134f27..3efae9e 100644
--- a/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-durable-subscription/src/main/resources/activemq/server1/broker.xml
@@ -67,7 +67,6 @@ under the License.
 
       <cluster-connections>
          <cluster-connection name="my-cluster">
-            <address>jms</address>
             <connector-ref>netty-connector</connector-ref>
             <retry-interval>500</retry-interval>
             <use-duplicate-detection>true</use-duplicate-detection>
@@ -81,7 +80,7 @@ under the License.
 
       <security-settings>
          <!--security for example queue-->
-         <security-setting match="jms.topic.exampleTopic">
+         <security-setting match="exampleTopic">
             <permission type="createDurableQueue" roles="guest"/>
             <permission type="deleteDurableQueue" roles="guest"/>
             <permission type="createNonDurableQueue" roles="guest"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-grouping/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-grouping/readme.html b/examples/features/clustered/clustered-grouping/readme.html
index 7bce8f2..e066ca9 100644
--- a/examples/features/clustered/clustered-grouping/readme.html
+++ b/examples/features/clustered/clustered-grouping/readme.html
@@ -37,7 +37,6 @@ under the License.
      <code>
        &lt;cluster-connections&gt;
           &lt;cluster-connection name="my-cluster"&gt;
-             &lt;address&gt;jms&lt;/address&gt;
              &lt;connector-ref>netty-connector&lt;/connector-ref>
              &lt;retry-interval&gt;500&lt;/retry-interval&gt;
              &lt;use-duplicate-detection&gt;true&lt;/use-duplicate-detection&gt;
@@ -60,7 +59,6 @@ under the License.
      <code>
        &lt;cluster-connections&gt;
           &lt;cluster-connection name="my-cluster"&gt;
-             &lt;address&gt;jms&lt;/address&gt;
              &lt;retry-interval&gt;500&lt;/retry-interval&gt;
              &lt;use-duplicate-detection&gt;true&lt;/use-duplicate-detection&gt;
              &lt;message-load-balancing&gt;STRICT&lt;/message-load-balancing&gt;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server0/broker.xml
index 4520059..07e2c81 100644
--- a/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server0/broker.xml
@@ -69,7 +69,6 @@ under the License.
 
       <cluster-connections>
          <cluster-connection name="my-cluster">
-            <address>jms</address>
             <connector-ref>netty-connector</connector-ref>
             <retry-interval>500</retry-interval>
             <use-duplicate-detection>true</use-duplicate-detection>
@@ -81,7 +80,7 @@ under the License.
 
       <grouping-handler name="my-grouping-handler">
          <type>LOCAL</type>
-         <address>jms</address>
+         <address>exampleQueue</address>
          <timeout>5000</timeout>
          <group-timeout>-1</group-timeout>
          <reaper-period>30000</reaper-period>
@@ -91,7 +90,7 @@ under the License.
 
       <security-settings>
          <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
+         <security-setting match="exampleQueue">
             <permission type="createDurableQueue" roles="guest"/>
             <permission type="deleteDurableQueue" roles="guest"/>
             <permission type="createNonDurableQueue" roles="guest"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server1/broker.xml
index 4765f7a..0d681c8 100644
--- a/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server1/broker.xml
@@ -68,7 +68,6 @@ under the License.
 
       <cluster-connections>
          <cluster-connection name="my-cluster">
-            <address>jms</address>
             <connector-ref>netty-connector</connector-ref>
             <retry-interval>500</retry-interval>
             <use-duplicate-detection>true</use-duplicate-detection>
@@ -80,7 +79,7 @@ under the License.
 
       <grouping-handler name="my-grouping-handler">
          <type>REMOTE</type>
-         <address>jms</address>
+         <address>exampleQueue</address>
          <timeout>5000</timeout>
       </grouping-handler>
 
@@ -88,7 +87,7 @@ under the License.
 
       <security-settings>
          <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
+         <security-setting match="exampleQueue">
             <permission type="createDurableQueue" roles="guest"/>
             <permission type="deleteDurableQueue" roles="guest"/>
             <permission type="createNonDurableQueue" roles="guest"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server2/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server2/broker.xml b/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server2/broker.xml
index 16bf2eb..c3a637f 100644
--- a/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server2/broker.xml
+++ b/examples/features/clustered/clustered-grouping/src/main/resources/activemq/server2/broker.xml
@@ -68,7 +68,6 @@ under the License.
 
       <cluster-connections>
          <cluster-connection name="my-cluster">
-            <address>jms</address>
             <connector-ref>netty-connector</connector-ref>
             <retry-interval>500</retry-interval>
             <use-duplicate-detection>true</use-duplicate-detection>
@@ -80,7 +79,7 @@ under the License.
 
       <grouping-handler name="my-grouping-handler">
          <type>REMOTE</type>
-         <address>jms</address>
+         <address>exampleQueue</address>
          <timeout>5000</timeout>
       </grouping-handler>
 
@@ -88,7 +87,7 @@ under the License.
 
       <security-settings>
          <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
+         <security-setting match="exampleQueue">
             <permission type="createDurableQueue" roles="guest"/>
             <permission type="deleteDurableQueue" roles="guest"/>
             <permission type="createNonDurableQueue" roles="guest"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server0/broker.xml
index 17809e5..763f6aa 100644
--- a/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server0/broker.xml
@@ -69,7 +69,6 @@ under the License.
 
       <cluster-connections>
          <cluster-connection name="my-cluster">
-            <address>jms</address>
             <connector-ref>netty-connector</connector-ref>
             <retry-interval>500</retry-interval>
             <use-duplicate-detection>true</use-duplicate-detection>
@@ -83,7 +82,7 @@ under the License.
 
       <security-settings>
          <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
+         <security-setting match="exampleQueue">
             <permission type="createDurableQueue" roles="guest"/>
             <permission type="deleteDurableQueue" roles="guest"/>
             <permission type="createNonDurableQueue" roles="guest"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server1/broker.xml
index 267eae7..da3ffa3 100644
--- a/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-jgroups/src/main/resources/activemq/server1/broker.xml
@@ -68,7 +68,6 @@ under the License.
 
       <cluster-connections>
          <cluster-connection name="my-cluster">
-            <address>jms</address>
             <connector-ref>netty-connector</connector-ref>
             <retry-interval>500</retry-interval>
             <use-duplicate-detection>true</use-duplicate-detection>
@@ -82,7 +81,7 @@ under the License.
 
       <security-settings>
          <!--security for example queue-->
-         <security-setting match="jms.queue.exampleQueue">
+         <security-setting match="exampleQueue">
             <permission type="createDurableQueue" roles="guest"/>
             <permission type="deleteDurableQueue" roles="guest"/>
             <permission type="createNonDurableQueue" roles="guest"/>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0861be14/examples/features/clustered/clustered-queue/readme.html
----------------------------------------------------------------------
diff --git a/examples/features/clustered/clustered-queue/readme.html b/examples/features/clustered/clustered-queue/readme.html
index b5fce81..a39fc4c 100644
--- a/examples/features/clustered/clustered-queue/readme.html
+++ b/examples/features/clustered/clustered-queue/readme.html
@@ -40,7 +40,6 @@ under the License.
      and to load balance the messages between the nodes.</p>
      <pre class="prettyprint">
      <code>&lt;cluster-connection name="my-cluster"&gt;
-        &lt;address&gt;jms&lt;/address&gt;
         &lt;connector-ref>netty-connector&lt;/connector-ref>
         &lt;retry-interval&gt;500&lt;/retry-interval&gt;
         &lt;use-duplicate-detection&gt;true&lt;/use-duplicate-detection&gt;


Mime
View raw message