From 0861be14c15fef9e87235d5d56abbf1bda9f14dc Mon Sep 17 00:00:00 2001
From: jbertram
Date: Tue, 15 Nov 2016 17:10:17 -0600
Subject: [PATCH] ARTEMIS-789 Fix various failing tests due to addressing
changes
---
.../artemis/cli/commands/AbstractAction.java | 1 -
.../activemq/artemis/cli/commands/Create.java | 37 ++-
.../cli/commands/address/CreateAddress.java | 1 -
.../cli/commands/address/ShowAddress.java | 3 +-
.../artemis/cli/commands/etc/broker.xml | 4 +-
.../apache/activemq/cli/test/ArtemisTest.java | 18 +-
.../config/ActiveMQDefaultConfiguration.java | 4 +-
.../api/core/client/ClientSession.java | 28 +++
.../management/ActiveMQServerControl.java | 33 ++-
.../core/management/ObjectNameBuilder.java | 2 +-
.../core/client/impl/ClientSessionImpl.java | 37 ++-
.../core/impl/ActiveMQSessionContext.java | 6 +-
.../protocol/core/impl/PacketDecoder.java | 6 +
.../core/protocol/core/impl/PacketImpl.java | 2 +
.../impl/wireformat/CreateQueueMessage.java | 26 +-
.../wireformat/CreateQueueMessage_V2.java | 99 ++++++++
.../activemq/artemis/core/security/Role.java | 23 +-
.../spi/core/remoting/SessionContext.java | 3 +-
.../artemis/utils/SecurityFormatter.java | 7 +-
.../src/test/scripts/validate-instalation.sh | 4 +-
.../src/main/resources/artemis.xml | 4 +-
.../jms/client/ActiveMQMessageProducer.java | 2 +-
.../artemis/jms/client/ActiveMQSession.java | 9 +-
.../jms/server/impl/JMSServerManagerImpl.java | 4 +-
.../protocol/openwire/OpenWireConnection.java | 1 -
.../protocol/openwire/amq/AMQSession.java | 2 +-
.../core/protocol/stomp/StompConnection.java | 26 +-
.../impl/FileConfigurationParser.java | 26 ++
.../impl/ActiveMQServerControlImpl.java | 91 ++++++-
.../persistence/config/PersistedRoles.java | 29 ++-
.../AbstractJournalStorageManager.java | 1 +
.../core/postoffice/impl/PostOfficeImpl.java | 4 +-
.../core/ServerSessionPacketHandler.java | 13 +-
.../artemis/core/server/ActiveMQServer.java | 1 -
.../artemis/core/server/ServerSession.java | 2 +-
.../core/server/impl/ActiveMQServerImpl.java | 27 +-
.../artemis/core/server/impl/AddressInfo.java | 11 +
.../impl/AutoCreatedQueueManagerImpl.java | 8 +-
.../artemis/core/server/impl/QueueImpl.java | 2 +-
.../core/server/impl/ServerSessionImpl.java | 7 +-
.../core/settings/impl/AddressSettings.java | 167 +++++++++++--
.../schema/artemis-configuration.xsd | 43 +++-
.../config/impl/FileConfigurationTest.java | 4 +-
.../artemis/core/security/RoleTest.java | 20 +-
.../core/settings/AddressSettingsTest.java | 10 +-
.../artemis/core/settings/RepositoryTest.java | 14 +-
.../ConfigurationTest-full-config.xml | 8 +
artemis-tools/pom.xml | 2 +-
docs/user-manual/en/queue-attributes.md | 32 ++-
.../readme.html | 1 -
.../ClusteredDurableSubscriptionExample.java | 2 +
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../clustered/clustered-grouping/readme.html | 2 -
.../resources/activemq/server0/broker.xml | 5 +-
.../resources/activemq/server1/broker.xml | 5 +-
.../resources/activemq/server2/broker.xml | 5 +-
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../clustered/clustered-queue/readme.html | 1 -
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../readme.html | 1 -
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server1/broker.xml | 2 +-
.../resources/activemq/server2/broker.xml | 2 +-
.../resources/activemq/server3/broker.xml | 2 +-
.../clustered-static-discovery/readme.html | 1 -
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server2/broker.xml | 3 +-
.../resources/activemq/server3/broker.xml | 3 +-
.../clustered-static-oneway/readme.html | 1 -
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server2/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server1/broker.xml | 2 +-
.../clustered/clustered-topic/readme.html | 1 -
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 5 +-
.../resources/activemq/server1/broker.xml | 5 +-
.../clustered/symmetric-cluster/readme.html | 1 -
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server2/broker.xml | 3 +-
.../resources/activemq/server3/broker.xml | 3 +-
.../resources/activemq/server4/broker.xml | 3 +-
.../resources/activemq/server5/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 9 +-
.../resources/activemq/server1/broker.xml | 9 +-
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 1 -
.../resources/activemq/server1/broker.xml | 1 -
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server2/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 7 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 3 +-
.../resources/activemq/server1/broker.xml | 3 +-
.../resources/activemq/server0/broker.xml | 10 +-
.../resources/activemq/server1/broker.xml | 2 +-
examples/features/standard/cdi/pom.xml | 12 +
.../resources/activemq/server0/broker.xml | 6 +-
.../resources/activemq/server0/broker.xml | 4 +-
.../resources/activemq/server0/broker.xml | 18 +-
.../resources/activemq/server1/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 6 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server1/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../jms/example/LargeMessageExample.java | 2 +-
.../resources/activemq/server0/broker.xml | 4 +-
.../resources/activemq/server0/broker.xml | 6 +-
.../jms/example/ManagementExample.java | 10 +-
.../resources/activemq/server0/broker.xml | 8 +-
.../resources/activemq/server0/broker.xml | 8 +-
.../resources/activemq/server0/broker.xml | 8 +-
.../jms/example/PreacknowledgeExample.java | 3 +-
.../resources/activemq/server0/broker.xml | 4 +-
.../resources/activemq/server0/broker.xml | 4 +-
.../resources/activemq/server0/broker.xml | 4 +-
.../resources/activemq/server0/broker.xml | 6 +-
.../resources/activemq/server0/broker.xml | 6 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 6 +-
.../resources/activemq/server0/broker.xml | 4 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../resources/activemq/server0/broker.xml | 4 +-
.../resources/activemq/server0/broker.xml | 8 +-
.../artemis/jms/example/ProtonCPPExample.java | 3 +-
.../resources/activemq/server0/broker.xml | 2 +-
.../addressing/AddressingTest.java | 6 +-
.../amqp/AmqpClientTestSupport.java | 2 +-
.../integration/cli/AddressCommandTest.java | 4 -
.../integration/cli/QueueCommandTest.java | 4 +-
.../client/AutoCreateJmsDestinationTest.java | 4 +-
.../tests/integration/client/SessionTest.java | 3 +-
.../failover/SecurityFailoverTest.java | 2 +-
.../crossprotocol/AMQPToOpenwireTest.java | 2 +-
.../crossprotocol/OpenWireToAMQPTest.java | 2 +-
.../interceptors/InterceptorTest.java | 8 +-
.../cluster/AutoCreateQueueClusterTest.java | 10 +-
.../cluster/TemporaryQueueClusterTest.java | 2 +-
.../jms/jms2client/NonExistentQueueTest.java | 4 +-
.../management/ActiveMQServerControlTest.java | 4 +-
.../ActiveMQServerControlUsingCoreTest.java | 42 +++-
.../management/AddressControlTest.java | 4 +-
.../AddressControlUsingCoreTest.java | 2 +-
.../management/ManagementWithStompTest.java | 232 ------------------
...ManagementWithConfiguredAdminUserTest.java | 4 +-
.../management/SecurityNotificationTest.java | 4 +-
.../mqtt/imported/MQTTTestSupport.java | 3 +-
.../openwire/OpenWireTestBase.java | 10 +-
.../openwire/SimpleOpenWireTest.java | 21 +-
.../RolesConfigurationStorageTest.java | 10 +-
.../ActiveMQMessageHandlerSecurityTest.java | 2 +-
.../tests/integration/ra/JMSContextTest.java | 2 +-
.../ra/OutgoingConnectionTest.java | 2 +-
.../ra/OutgoingConnectionTestJTA.java | 2 +-
.../security/LDAPSecurityTest.java | 4 +-
.../integration/security/SecurityTest.java | 102 ++++----
.../integration/server/ResourceLimitTest.java | 2 +-
.../ssl/DualAuthenticationTest.java | 4 +-
.../tests/integration/stomp/StompTest.java | 58 +++++
.../integration/stomp/StompTestBase.java | 8 +-
.../integration/stomp/v12/StompV12Test.java | 7 +-
.../tests/util/JMSClusteredTestBase.java | 2 -
.../src/test/resources/reload-test-jms.xml | 2 +-
.../resources/reload-test-updated-jms.xml | 2 +-
.../jms/tests/MessageProducerTest.java | 4 +-
.../artemis/jms/tests/SessionTest.java | 13 +-
.../jms/tests/message/MessageHeaderTest.java | 30 ++-
.../jms/conform/session/TopicSessionTest.java | 2 +
.../impl/ActiveMQSecurityManagerImplTest.java | 28 +--
190 files changed, 1178 insertions(+), 763 deletions(-)
create mode 100644 artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage_V2.java
delete mode 100644 tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ManagementWithStompTest.java
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java
index b4dbba8295..3619ed70db 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java
@@ -16,7 +16,6 @@
*/
package org.apache.activemq.artemis.cli.commands;
-import io.airlift.airline.Option;
import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
import org.apache.activemq.artemis.api.core.client.ClientMessage;
import org.apache.activemq.artemis.api.core.client.ClientRequestor;
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
index 1ae82b3e64..ff2753a200 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
@@ -197,11 +197,11 @@ public class Create extends InputAbstract {
@Option(name = "--no-web", description = "This will remove the web server definition from bootstrap.xml")
boolean noWeb;
- @Option(name = "--queues", description = "comma separated list of jms queues.")
+ @Option(name = "--queues", description = "comma separated list of queues.")
String queues;
- @Option(name = "--topics", description = "comma separated list of jms topics ")
- String topics;
+ @Option(name = "--addresses", description = "comma separated list of addresses ")
+ String addresses;
@Option(name = "--aio", description = "Force aio journal on the configuration regardless of the library being available or not.")
boolean forceLibaio;
@@ -632,7 +632,7 @@ public class Create extends InputAbstract {
filters.put("${cluster-password}", "");
}
- applyJMSObjects(filters);
+ applyAddressesAndQueues(filters);
if (home != null) {
filters.put("${home}", path(home, false));
@@ -784,12 +784,33 @@ public class Create extends InputAbstract {
for (String str : getQueueList()) {
printWriter.println(" ");
}
- for (String str : getTopicList()) {
+ for (String str : getAddressList()) {
printWriter.println(" ");
}
filters.put("${jms-list.settings}", writer.toString());
}
+ /**
+ * It will create the address and queue configurations
+ */
+ private void applyAddressesAndQueues(HashMap filters) {
+ StringWriter writer = new StringWriter();
+ PrintWriter printWriter = new PrintWriter(writer);
+ printWriter.println();
+
+ for (String str : getQueueList()) {
+ printWriter.println(" ");
+ printWriter.println(" ");
+ printWriter.println(" ");
+ printWriter.println(" ");
+ printWriter.println(" ");
+ }
+ for (String str : getAddressList()) {
+ printWriter.println(" ");
+ }
+ filters.put("${address-queue.settings}", writer.toString());
+ }
+
private void performAutoTune(HashMap filters, boolean aio, File dataFolder) {
if (noAutoTune) {
filters.put("${journal-buffer.settings}", "");
@@ -862,11 +883,11 @@ public class Create extends InputAbstract {
}
}
- private String[] getTopicList() {
- if (topics == null) {
+ private String[] getAddressList() {
+ if (addresses == null) {
return new String[0];
} else {
- return topics.split(",");
+ return addresses.split(",");
}
}
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
index 6c92dc64d0..86aafaf5cf 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
@@ -23,7 +23,6 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage;
import org.apache.activemq.artemis.api.core.management.ManagementHelper;
import org.apache.activemq.artemis.cli.commands.AbstractAction;
import org.apache.activemq.artemis.cli.commands.ActionContext;
-import org.apache.activemq.artemis.core.server.impl.AddressInfo;
@Command(name = "create", description = "create an address")
public class CreateAddress extends AbstractAction {
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java
index 34331bbeae..013b504586 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java
@@ -46,8 +46,7 @@ public class ShowAddress extends AbstractAction {
public void setUpInvocation(ClientMessage message) throws Exception {
if (bindings) {
ManagementHelper.putOperationInvocation(message, "broker", "listBindingsForAddress", getName());
- }
- else {
+ } else {
ManagementHelper.putOperationInvocation(message, "broker", "getAddressInfo", getName());
}
}
diff --git a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
index 0871ab6e54..6c7f91c198 100644
--- a/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
+++ b/artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/broker.xml
@@ -74,6 +74,8 @@ ${cluster-security.settings}${cluster.settings}${replicated.settings}${shared-st
+
+
@@ -105,7 +107,7 @@ ${cluster-security.settings}${cluster.settings}${replicated.settings}${shared-st
-
+ ${address-queue.settings}
diff --git a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
index 3c03ab2cd3..85d194aeb4 100644
--- a/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
+++ b/artemis-cli/src/test/java/org/apache/activemq/cli/test/ArtemisTest.java
@@ -533,20 +533,20 @@ public class ArtemisTest {
File instanceFolder = temporaryFolder.newFolder(folderName);
setupAuth(instanceFolder);
- String queues = "q1,t2";
- String topics = "t1,t2";
+ String queues = "q1,q2";
+ String addresses = "a1,a2";
// This is usually set when run from the command line via artemis.profile
- Run.setEmbedded(false);
- Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--queues", queues, "--topics", topics, "--no-autotune", "--require-login");
+ Run.setEmbedded(true);
+ Artemis.main("create", instanceFolder.getAbsolutePath(), "--force", "--silent", "--no-web", "--queues", queues, "--addresses", addresses, "--no-autotune", "--require-login");
System.setProperty("artemis.instance", instanceFolder.getAbsolutePath());
// Some exceptions may happen on the initialization, but they should be ok on start the basic core protocol
Artemis.internalExecute("run");
- Artemis.main("queue", "create", "--name", "q1", "--address", "q1", "--user", "admin", "--password", "admin");
- Artemis.main("queue", "create", "--name", "t2", "--address", "t2", "--user", "admin", "--password", "admin");
+// Artemis.main("queue", "create", "--name", "q1", "--address", "q1", "--user", "admin", "--password", "admin", "--autoCreateAddress");
+// Artemis.main("queue", "create", "--name", "t2", "--address", "t2", "--user", "admin", "--password", "admin", "--autoCreateAddress");
try {
try (ServerLocator locator = ServerLocatorImpl.newLocator("tcp://localhost:61616");
@@ -556,9 +556,9 @@ public class ArtemisTest {
ClientSession.QueueQuery queryResult = coreSession.queueQuery(SimpleString.toSimpleString(str));
assertTrue("Couldn't find queue " + str, queryResult.isExists());
}
- for (String str : topics.split(",")) {
- ClientSession.QueueQuery queryResult = coreSession.queueQuery(SimpleString.toSimpleString(str));
- assertTrue("Couldn't find topic " + str, queryResult.isExists());
+ for (String str : addresses.split(",")) {
+ ClientSession.AddressQuery queryResult = coreSession.addressQuery(SimpleString.toSimpleString(str));
+ assertTrue("Couldn't find address " + str, queryResult.isExists());
}
}
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 e9212f20fc..6fb5580ef9 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
@@ -162,8 +162,8 @@ public final class ActiveMQDefaultConfiguration {
// the name of the address that consumers bind to receive management notifications
private static SimpleString DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS = new SimpleString("activemq.notifications");
- // The default address used for clustering
- private static String DEFAULT_CLUSTER_ADDRESS = "jms";
+ // The default address used for clustering, empty string means all addresses
+ private static String DEFAULT_CLUSTER_ADDRESS = "";
// Cluster username. It applies to all cluster configurations.
private static String DEFAULT_CLUSTER_USER = "ACTIVEMQ.CLUSTER.ADMIN.USER";
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 35bc9f9de4..72b1a11215 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
@@ -293,6 +293,34 @@ public interface ClientSession extends XAResource, AutoCloseable {
*/
void createQueue(String address, String queueName, String filter, boolean durable) throws ActiveMQException;
+ /**
+ * Creates a non-temporary queue.
+ *
+ * @param address the queue will be bound to this address
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param durable whether the queue is durable or not
+ * @param autoCreated whether to mark this queue as autoCreated or not
+ * @throws ActiveMQException in an exception occurs while creating the queue
+ */
+ void createQueue(SimpleString address,
+ SimpleString queueName,
+ SimpleString filter,
+ boolean durable,
+ boolean autoCreated) throws ActiveMQException;
+
+ /**
+ * Creates a non-temporaryqueue.
+ *
+ * @param address the queue will be bound to this address
+ * @param queueName the name of the queue
+ * @param filter only messages which match this filter will be put in the queue
+ * @param durable whether the queue is durable or not
+ * @param autoCreated whether to mark this queue as autoCreated or not
+ * @throws ActiveMQException in an exception occurs while creating the queue
+ */
+ void createQueue(String address, String queueName, String filter, boolean durable, boolean autoCreated) throws ActiveMQException;
+
/**
* Creates a temporary queue.
*
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 0654dbf0fd..33584bf9b4 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
@@ -811,7 +811,8 @@ public interface ActiveMQServerControl {
@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;
+ @Parameter(desc = "a comma-separated list of roles allowed to create addresses", name = "createAddressRoles") String createAddressRoles,
+ @Parameter(desc = "a comma-separated list of roles allowed to delete addresses", name = "deleteAddressRoles") String deleteAddressRoles) 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;
@@ -848,6 +849,36 @@ public interface ActiveMQServerControl {
@Parameter(desc = "allow auto-created queues to be deleted automatically", name = "autoDeleteJmsQueues") boolean autoDeleteJmsQueues,
@Parameter(desc = "allow topics to be created automatically", name = "autoCreateJmsTopics") boolean autoCreateJmsTopics,
@Parameter(desc = "allow auto-created topics to be deleted automatically", name = "autoDeleteJmsTopics") boolean autoDeleteJmsTopics) throws Exception;
+ /**
+ * adds a new address setting for a specific address
+ */
+ @Operation(desc = "Add address settings for addresses matching the addressMatch", impact = MBeanOperationInfo.ACTION)
+ void addAddressSettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch,
+ @Parameter(desc = "the dead letter address setting", name = "DLA") String DLA,
+ @Parameter(desc = "the expiry address setting", name = "expiryAddress") String expiryAddress,
+ @Parameter(desc = "the expiry delay setting", name = "expiryDelay") long expiryDelay,
+ @Parameter(desc = "are any queues created for this address a last value queue", name = "lastValueQueue") boolean lastValueQueue,
+ @Parameter(desc = "the delivery attempts", name = "deliveryAttempts") int deliveryAttempts,
+ @Parameter(desc = "the max size in bytes", name = "maxSizeBytes") long maxSizeBytes,
+ @Parameter(desc = "the page size in bytes", name = "pageSizeBytes") int pageSizeBytes,
+ @Parameter(desc = "the max number of pages in the soft memory cache", name = "pageMaxCacheSize") int pageMaxCacheSize,
+ @Parameter(desc = "the redelivery delay", name = "redeliveryDelay") long redeliveryDelay,
+ @Parameter(desc = "the redelivery delay multiplier", name = "redeliveryMultiplier") double redeliveryMultiplier,
+ @Parameter(desc = "the maximum redelivery delay", name = "maxRedeliveryDelay") long maxRedeliveryDelay,
+ @Parameter(desc = "the redistribution delay", name = "redistributionDelay") long redistributionDelay,
+ @Parameter(desc = "do we send to the DLA when there is no where to route the message", name = "sendToDLAOnNoRoute") boolean sendToDLAOnNoRoute,
+ @Parameter(desc = "the policy to use when the address is full", name = "addressFullMessagePolicy") String addressFullMessagePolicy,
+ @Parameter(desc = "when a consumer falls below this threshold in terms of messages consumed per second it will be considered 'slow'", name = "slowConsumerThreshold") long slowConsumerThreshold,
+ @Parameter(desc = "how often (in seconds) to check for slow consumers", name = "slowConsumerCheckPeriod") long slowConsumerCheckPeriod,
+ @Parameter(desc = "the policy to use when a slow consumer is detected", name = "slowConsumerPolicy") String slowConsumerPolicy,
+ @Parameter(desc = "allow jms queues to be created automatically", name = "autoCreateJmsQueues") boolean autoCreateJmsQueues,
+ @Parameter(desc = "allow auto-created jms queues to be deleted automatically", name = "autoDeleteJmsQueues") boolean autoDeleteJmsQueues,
+ @Parameter(desc = "allow jms topics to be created automatically", name = "autoCreateJmsTopics") boolean autoCreateJmsTopics,
+ @Parameter(desc = "allow auto-created jms topics to be deleted automatically", name = "autoDeleteJmsTopics") boolean autoDeleteJmsTopics,
+ @Parameter(desc = "allow queues to be created automatically", name = "autoCreateQueues") boolean autoCreateQueues,
+ @Parameter(desc = "allow auto-created queues to be deleted automatically", name = "autoDeleteQueues") boolean autoDeleteQueues,
+ @Parameter(desc = "allow topics to be created automatically", name = "autoCreateAddresses") boolean autoCreateAddresses,
+ @Parameter(desc = "allow auto-created topics to be deleted automatically", name = "autoDeleteAddresses") boolean autoDeleteAddresses) throws Exception;
void removeAddressSettings(String addressMatch) throws Exception;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
index 019996a28d..3bbd45658c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
@@ -165,7 +165,7 @@ public final class ObjectNameBuilder {
* Returns the ObjectName used by JMSQueueControl.
*/
public ObjectName getJMSQueueObjectName(final String name) throws Exception {
- return createObjectName("Queue", name);
+ return getQueueObjectName(SimpleString.toSimpleString(name), SimpleString.toSimpleString(name));
}
/**
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 16311b03ab..145ca995c4 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
@@ -237,14 +237,14 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
@Override
public void createQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException {
- internalCreateQueue(address, queueName, null, false, false);
+ internalCreateQueue(address, queueName, null, false, false, false);
}
@Override
public void createQueue(final SimpleString address,
final SimpleString queueName,
final boolean durable) throws ActiveMQException {
- internalCreateQueue(address, queueName, null, durable, false);
+ internalCreateQueue(address, queueName, null, durable, false, false);
}
@Override
@@ -295,7 +295,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
final SimpleString queueName,
final SimpleString filterString,
final boolean durable) throws ActiveMQException {
- internalCreateQueue(address, queueName, filterString, durable, false);
+ internalCreateQueue(address, queueName, filterString, durable, false, false);
}
@Override
@@ -306,28 +306,46 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
createQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString), durable);
}
+ @Override
+ public void createQueue(final SimpleString address,
+ final SimpleString queueName,
+ final SimpleString filterString,
+ final boolean durable,
+ final boolean autoCreated) throws ActiveMQException {
+ internalCreateQueue(address, queueName, filterString, durable, false, autoCreated);
+ }
+
+ @Override
+ public void createQueue(final String address,
+ final String queueName,
+ final String filterString,
+ final boolean durable,
+ final boolean autoCreated) throws ActiveMQException {
+ createQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString), durable, autoCreated);
+ }
+
@Override
public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException {
- internalCreateQueue(address, queueName, null, false, true);
+ internalCreateQueue(address, queueName, null, false, true, false);
}
@Override
public void createTemporaryQueue(final String address, final String queueName) throws ActiveMQException {
- internalCreateQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), null, false, true);
+ internalCreateQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), null, false, true, false);
}
@Override
public void createTemporaryQueue(final SimpleString address,
final SimpleString queueName,
final SimpleString filter) throws ActiveMQException {
- internalCreateQueue(address, queueName, filter, false, true);
+ internalCreateQueue(address, queueName, filter, false, true, false);
}
@Override
public void createTemporaryQueue(final String address,
final String queueName,
final String filter) throws ActiveMQException {
- internalCreateQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filter), false, true);
+ internalCreateQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filter), false, true, false);
}
@Override
@@ -1551,7 +1569,8 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
final SimpleString queueName,
final SimpleString filterString,
final boolean durable,
- final boolean temp) throws ActiveMQException {
+ final boolean temp,
+ final boolean autoCreated) throws ActiveMQException {
checkClosed();
if (durable && temp) {
@@ -1560,7 +1579,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
startCall();
try {
- sessionContext.createQueue(address, queueName, filterString, durable, temp);
+ sessionContext.createQueue(address, queueName, filterString, durable, temp, autoCreated);
} finally {
endCall();
}
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 919da1949f..cbbe2b7e31 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
@@ -52,6 +52,7 @@ 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.CreateQueueMessage_V2;
import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSharedQueueMessage;
import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.DisconnectConsumerMessage;
@@ -594,8 +595,9 @@ public class ActiveMQSessionContext extends SessionContext {
SimpleString queueName,
SimpleString filterString,
boolean durable,
- boolean temp) throws ActiveMQException {
- CreateQueueMessage request = new CreateQueueMessage(address, queueName, filterString, durable, temp, true);
+ boolean temp,
+ boolean autoCreated) throws ActiveMQException {
+ CreateQueueMessage request = new CreateQueueMessage_V2(address, queueName, filterString, durable, temp, autoCreated, true);
sessionChannel.sendBlocking(request, PacketImpl.NULL_RESPONSE);
}
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 834822cb60..de1edbcf68 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
@@ -29,6 +29,7 @@ import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.ClusterTop
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.CreateQueueMessage_V2;
import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSessionResponseMessage;
import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.CreateSharedQueueMessage;
@@ -91,6 +92,7 @@ import static org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.CRE
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_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.DISCONNECT;
@@ -245,6 +247,10 @@ public abstract class PacketDecoder implements Serializable {
packet = new CreateQueueMessage();
break;
}
+ case CREATE_QUEUE_V2: {
+ packet = new CreateQueueMessage_V2();
+ break;
+ }
case CREATE_SHARED_QUEUE: {
packet = new CreateSharedQueueMessage();
break;
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 e07d9b5cfc..abc1eefe95 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
@@ -251,6 +251,8 @@ public class PacketImpl implements Packet {
public static final byte CREATE_ADDRESS = -11;
+ public static final byte CREATE_QUEUE_V2 = -12;
+
// Static --------------------------------------------------------
public PacketImpl(final byte type) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java
index e837d55ba0..2ebf1474aa 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage.java
@@ -22,17 +22,17 @@ import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
public class CreateQueueMessage extends PacketImpl {
- private SimpleString address;
+ protected SimpleString address;
- private SimpleString queueName;
+ protected SimpleString queueName;
- private SimpleString filterString;
+ protected SimpleString filterString;
- private boolean durable;
+ protected boolean durable;
- private boolean temporary;
+ protected boolean temporary;
- private boolean requiresResponse;
+ protected boolean requiresResponse;
public CreateQueueMessage(final SimpleString address,
final SimpleString queueName,
@@ -55,16 +55,28 @@ public class CreateQueueMessage extends PacketImpl {
}
// Public --------------------------------------------------------
+ /**
+ * @param createQueueMessageV2
+ */
+ public CreateQueueMessage(byte createQueueMessageV2) {
+ super(createQueueMessageV2);
+ }
@Override
public String toString() {
StringBuffer buff = new StringBuffer(getParentString());
+ buff.append("]");
+ return buff.toString();
+ }
+
+ @Override
+ public String getParentString() {
+ StringBuffer buff = new StringBuffer(super.getParentString());
buff.append(", address=" + address);
buff.append(", queueName=" + queueName);
buff.append(", filterString=" + filterString);
buff.append(", durable=" + durable);
buff.append(", temporary=" + temporary);
- buff.append("]");
return buff.toString();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage_V2.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage_V2.java
new file mode 100644
index 0000000000..13a4a581cd
--- /dev/null
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/CreateQueueMessage_V2.java
@@ -0,0 +1,99 @@
+/*
+ * 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;
+
+public class CreateQueueMessage_V2 extends CreateQueueMessage {
+
+ private boolean autoCreated;
+
+ public CreateQueueMessage_V2(final SimpleString address,
+ final SimpleString queueName,
+ final SimpleString filterString,
+ final boolean durable,
+ final boolean temporary,
+ final boolean autoCreated,
+ final boolean requiresResponse) {
+ this();
+
+ this.address = address;
+ this.queueName = queueName;
+ this.filterString = filterString;
+ this.durable = durable;
+ this.temporary = temporary;
+ this.autoCreated = autoCreated;
+ this.requiresResponse = requiresResponse;
+ }
+
+ public CreateQueueMessage_V2() {
+ super(CREATE_QUEUE_V2);
+ }
+
+ // Public --------------------------------------------------------
+
+ @Override
+ public String toString() {
+ StringBuffer buff = new StringBuffer(super.getParentString());
+ buff.append(", autoCreated=" + autoCreated);
+ buff.append("]");
+ return buff.toString();
+ }
+
+ public boolean isAutoCreated() {
+ return autoCreated;
+ }
+
+ public void setAutoCreated(boolean autoCreated) {
+ this.autoCreated = autoCreated;
+ }
+
+ @Override
+ public void encodeRest(final ActiveMQBuffer buffer) {
+ super.encodeRest(buffer);
+ buffer.writeBoolean(autoCreated);
+ }
+
+ @Override
+ public void decodeRest(final ActiveMQBuffer buffer) {
+ super.decodeRest(buffer);
+ autoCreated = buffer.readBoolean();
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + (autoCreated ? 1231 : 1237);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (!super.equals(obj))
+ return false;
+ if (!(obj instanceof CreateQueueMessage_V2))
+ return false;
+ CreateQueueMessage_V2 other = (CreateQueueMessage_V2) obj;
+ if (autoCreated != other.autoCreated)
+ return false;
+ return true;
+ }
+}
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 2792d526db..a3b4c21b19 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
@@ -36,6 +36,8 @@ public class Role implements Serializable {
private final boolean createAddress;
+ private final boolean deleteAddress;
+
private final boolean createDurableQueue;
private final boolean deleteDurableQueue;
@@ -49,7 +51,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).add("createAddress", createAddress).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).add("deleteAddress", deleteAddress).build();
}
/**
@@ -87,8 +89,8 @@ public class Role implements Serializable {
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);
+ // is true then createAddress will be true. If either deleteDurableQueue or deleteNonDurableQueue is true then deleteAddress will be true.
+ this(name, send, consume, createDurableQueue, deleteDurableQueue, createNonDurableQueue, deleteNonDurableQueue, manage, browse, createDurableQueue || createNonDurableQueue, deleteDurableQueue || deleteNonDurableQueue);
}
public Role(final String name,
@@ -100,7 +102,8 @@ public class Role implements Serializable {
final boolean deleteNonDurableQueue,
final boolean manage,
final boolean browse,
- final boolean createAddress) {
+ final boolean createAddress,
+ final boolean deleteAddress) {
if (name == null) {
throw new NullPointerException("name is null");
}
@@ -108,6 +111,7 @@ public class Role implements Serializable {
this.send = send;
this.consume = consume;
this.createAddress = createAddress;
+ this.deleteAddress = deleteAddress;
this.createDurableQueue = createDurableQueue;
this.deleteDurableQueue = deleteDurableQueue;
this.createNonDurableQueue = createNonDurableQueue;
@@ -132,6 +136,10 @@ public class Role implements Serializable {
return createAddress;
}
+ public boolean isDeleteAddress() {
+ return deleteAddress;
+ }
+
public boolean isCreateDurableQueue() {
return createDurableQueue;
}
@@ -161,6 +169,9 @@ public class Role implements Serializable {
if (createAddress) {
stringReturn.append(" createAddress ");
}
+ if (deleteAddress) {
+ stringReturn.append(" deleteAddress ");
+ }
if (createDurableQueue) {
stringReturn.append(" createDurableQueue ");
}
@@ -202,6 +213,9 @@ public class Role implements Serializable {
if (createAddress != role.createAddress) {
return false;
}
+ if (deleteAddress != role.deleteAddress) {
+ return false;
+ }
if (createDurableQueue != role.createDurableQueue) {
return false;
}
@@ -237,6 +251,7 @@ public class Role implements Serializable {
result = 31 * result + (send ? 1 : 0);
result = 31 * result + (consume ? 1 : 0);
result = 31 * result + (createAddress ? 1 : 0);
+ result = 31 * result + (deleteAddress ? 1 : 0);
result = 31 * result + (createDurableQueue ? 1 : 0);
result = 31 * result + (deleteDurableQueue ? 1 : 0);
result = 31 * result + (createNonDurableQueue ? 1 : 0);
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 16e8314652..01f0b08274 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
@@ -172,7 +172,8 @@ public abstract class SessionContext {
SimpleString queueName,
SimpleString filterString,
boolean durable,
- boolean temp) throws ActiveMQException;
+ boolean temp,
+ boolean autoCreated) throws ActiveMQException;
public abstract ClientSession.QueueQuery queueQuery(SimpleString queueName) throws ActiveMQException;
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 7e9ff32255..08c414d0ed 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
@@ -33,7 +33,8 @@ public class SecurityFormatter {
String deleteNonDurableQueueRoles,
String manageRoles,
String browseRoles,
- String createAddressRoles) {
+ String createAddressRoles,
+ String deleteAddressRoles) {
List createDurableQueue = toList(createDurableQueueRoles);
List deleteDurableQueue = toList(deleteDurableQueueRoles);
List createNonDurableQueue = toList(createNonDurableQueueRoles);
@@ -43,6 +44,7 @@ public class SecurityFormatter {
List manage = toList(manageRoles);
List browse = toList(browseRoles);
List createAddress = toList(createAddressRoles);
+ List deleteAddress = toList(deleteAddressRoles);
Set allRoles = new HashSet<>();
allRoles.addAll(createDurableQueue);
@@ -54,10 +56,11 @@ public class SecurityFormatter {
allRoles.addAll(manage);
allRoles.addAll(browse);
allRoles.addAll(createAddress);
+ allRoles.addAll(deleteAddress);
Set 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), createAddressRoles.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), deleteAddressRoles.contains(role)));
}
return roles;
}
diff --git a/artemis-distribution/src/test/scripts/validate-instalation.sh b/artemis-distribution/src/test/scripts/validate-instalation.sh
index 85773a41d1..5837739112 100755
--- a/artemis-distribution/src/test/scripts/validate-instalation.sh
+++ b/artemis-distribution/src/test/scripts/validate-instalation.sh
@@ -49,7 +49,7 @@ pwd
sleep 5
./artemis producer
-./artemis consumer
+./artemis consumer --receive-timeout 10000 --break-on-null
./artemis stop
@@ -64,7 +64,7 @@ sleep 5
sleep 5
./artemis producer
-./artemis consumer
+./artemis consumer --receive-timeout 10000 --break-on-null
./artemis-service stop
diff --git a/artemis-features/src/main/resources/artemis.xml b/artemis-features/src/main/resources/artemis.xml
index fc1cdccdfd..7a51dc2d41 100644
--- a/artemis-features/src/main/resources/artemis.xml
+++ b/artemis-features/src/main/resources/artemis.xml
@@ -80,6 +80,8 @@ under the License.
+
+
@@ -97,7 +99,7 @@ under the License.
-1
10
PAGE
- true
+ true
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 5cbd40fd97..3d3fa66d0c 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
@@ -410,7 +410,7 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To
// TODO is it right to use the address for the queue name here?
clientSession.createTemporaryQueue(address, address);
} else {
- clientSession.createQueue(address, address, null, true);
+ clientSession.createQueue(address, address, null, true, true);
}
} else if (!destination.isQueue() && query.isAutoCreateJmsTopics()) {
clientSession.createAddress(address, true, true);
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 f514dbaf39..7fc0fb21ba 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
@@ -301,10 +301,9 @@ public class ActiveMQSession implements QueueSession, TopicSession {
if (!response.isExists()) {
if (jbd.isQueue() && response.isAutoCreateJmsQueues()) {
- // TODO create queue here in such a way that it is deleted when consumerCount == 0
// perhaps just relying on the broker to do it is simplest (i.e. deleteOnNoConsumers)
session.createAddress(jbd.getSimpleAddress(), false, true);
- session.createQueue(jbd.getSimpleAddress(), jbd.getSimpleAddress(), null, true);
+ session.createQueue(jbd.getSimpleAddress(), jbd.getSimpleAddress(), null, true, true);
} else if (!jbd.isQueue() && response.isAutoCreateJmsTopics()) {
session.createAddress(jbd.getSimpleAddress(), true, true);
} else {
@@ -647,9 +646,7 @@ public class ActiveMQSession implements QueueSession, TopicSession {
*/
if (!response.isExists() || !response.getQueueNames().contains(dest.getSimpleAddress())) {
if (response.isAutoCreateJmsQueues()) {
- // TODO create queue here in such a way that it is deleted when consumerCount == 0
- // perhaps just relying on the broker to do it is simplest (i.e. deleteOnNoConsumers)
- session.createQueue(dest.getSimpleAddress(), dest.getSimpleAddress(), true);
+ session.createQueue(dest.getSimpleAddress(), dest.getSimpleAddress(), null, true, true);
} else {
throw new InvalidDestinationException("Destination " + dest.getName() + " does not exist");
}
@@ -797,7 +794,7 @@ public class ActiveMQSession implements QueueSession, TopicSession {
AddressQuery response = session.addressQuery(new SimpleString(activeMQDestination.getAddress()));
if (!response.isExists()) {
if (response.isAutoCreateJmsQueues()) {
- session.createQueue(activeMQDestination.getSimpleAddress(), activeMQDestination.getSimpleAddress(), true);
+ session.createQueue(activeMQDestination.getSimpleAddress(), activeMQDestination.getSimpleAddress(), null, true, true);
} else {
throw new InvalidDestinationException("Destination " + activeMQDestination.getName() + " does not exist");
}
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 25ad349655..74fde632ac 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -1637,9 +1637,9 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
// long consumerCount = queue.getConsumerCount();
// long messageCount = queue.getMessageCount();
//
-// if (address.toString().startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX) && settings.getAutoDeleteJmsQueues() && queue.getMessageCount() == 0) {
+// if (address.toString().startsWith(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX) && settings.isAutoDeleteJmsQueues() && queue.getMessageCount() == 0) {
// if (ActiveMQJMSServerLogger.LOGGER.isDebugEnabled()) {
-// ActiveMQJMSServerLogger.LOGGER.debug("deleting auto-created queue \"" + queueName + ".\" consumerCount = " + consumerCount + "; messageCount = " + messageCount + "; getAutoDeleteJmsQueues = " + settings.getAutoDeleteJmsQueues());
+// ActiveMQJMSServerLogger.LOGGER.debug("deleting auto-created queue \"" + queueName + ".\" consumerCount = " + consumerCount + "; messageCount = " + messageCount + "; isAutoDeleteJmsQueues = " + settings.isAutoDeleteJmsQueues());
// }
//
// return destroyQueue(queueName.toString().substring(ActiveMQDestination.JMS_QUEUE_ADDRESS_PREFIX.length()), false);
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
index e823d0ef8d..1acf48aafe 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java
@@ -722,7 +722,6 @@ public class OpenWireConnection extends AbstractRemotingConnection implements Se
server.getSecurityStore().check(qName, checkType, this);
server.checkQueueCreationLimit(getUsername());
server.createQueue(qName, qName, null, connInfo == null ? null : SimpleString.toSimpleString(connInfo.getUserName()), true, false);
-
}
}
}
diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
index 35fd73347b..b2a2068274 100644
--- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
+++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
@@ -168,7 +168,7 @@ public class AMQSession implements SessionCallback {
BindingQueryResult bindingQuery = server.bindingQuery(queueName);
QueueQueryResult queueBinding = server.queueQuery(queueName);
- boolean isAutoCreate = bindingQuery.isExists() ? bindingQuery.isAutoCreateJmsQueues() : true;
+ boolean isAutoCreate = bindingQuery.isExists() ? true : bindingQuery.isAutoCreateJmsQueues();
if (!queueBinding.isExists()) {
if (isAutoCreate) {
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
index 4cb8fe903a..3b0991df4b 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java
@@ -39,8 +39,10 @@ import org.apache.activemq.artemis.core.remoting.FailureListener;
import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
import org.apache.activemq.artemis.core.server.ServerMessage;
+import org.apache.activemq.artemis.core.server.ServerSession;
import org.apache.activemq.artemis.core.server.impl.AddressInfo;
import org.apache.activemq.artemis.core.server.impl.ServerMessageImpl;
+import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
import org.apache.activemq.artemis.spi.core.remoting.Acceptor;
import org.apache.activemq.artemis.spi.core.remoting.Connection;
@@ -251,6 +253,7 @@ public final class StompConnection implements RemotingConnection {
return res;
}
+ // TODO this should take a type - send or receive so it knows whether to check the address or the queue
public void checkDestination(String destination) throws ActiveMQStompException {
if (!manager.destinationExists(destination)) {
throw BUNDLE.destinationNotExist(destination).setHandler(frameHandler);
@@ -259,17 +262,24 @@ public final class StompConnection implements RemotingConnection {
public boolean autoCreateDestinationIfPossible(String queue, AddressInfo.RoutingType routingType) throws ActiveMQStompException {
boolean result = false;
+ ServerSession session = getSession().getSession();
try {
if (manager.getServer().getAddressInfo(SimpleString.toSimpleString(queue)) == null) {
- // TODO check here to see if auto-creation is enabled
- if (routingType.equals(AddressInfo.RoutingType.MULTICAST)) {
- manager.getServer().createOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(queue)).setAutoCreated(true));
+ AddressSettings addressSettings = manager.getServer().getAddressSettingsRepository().getMatch(queue);
+ if (routingType != null && routingType.equals(AddressInfo.RoutingType.MULTICAST) && addressSettings.isAutoCreateAddresses()) {
+ session.createAddress(SimpleString.toSimpleString(queue), true, true);
+ result = true;
} else {
- manager.getServer().createOrUpdateAddressInfo(new AddressInfo(SimpleString.toSimpleString(queue)).setRoutingType(AddressInfo.RoutingType.ANYCAST).setAutoCreated(true));
- manager.getServer().createQueue(SimpleString.toSimpleString(queue), SimpleString.toSimpleString(queue), null, null, true, false, true);
+ if (addressSettings.isAutoCreateAddresses()) {
+ session.createAddress(SimpleString.toSimpleString(queue), false, true);
+ result = true;
+ }
+ if (addressSettings.isAutoCreateQueues()) {
+ session.createQueue(SimpleString.toSimpleString(queue), SimpleString.toSimpleString(queue), null, false, true, null, null, true);
+ result = true;
+ }
}
- result = true;
}
} catch (ActiveMQQueueExistsException e) {
// ignore
@@ -555,6 +565,10 @@ public final class StompConnection implements RemotingConnection {
return manager.createServerMessage();
}
+ public StompSession getSession() throws ActiveMQStompException {
+ return getSession(null);
+ }
+
public StompSession getSession(String txID) throws ActiveMQStompException {
StompSession session = null;
try {
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
index 349c1fd961..ea42a407b7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java
@@ -125,6 +125,10 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
private static final String BROWSE_NAME = "browse";
+ private static final String CREATEADDRESS_NAME = "createAddress";
+
+ private static final String DELETEADDRESS_NAME = "deleteAddress";
+
// Address parsing
private static final String DEAD_LETTER_ADDRESS_NODE_NAME = "dead-letter-address";
@@ -171,6 +175,14 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
private static final String AUTO_DELETE_JMS_TOPICS = "auto-delete-jms-topics";
+ private static final String AUTO_CREATE_QUEUES = "auto-create-queues";
+
+ private static final String AUTO_DELETE_QUEUES = "auto-delete-queues";
+
+ private static final String AUTO_CREATE_ADDRESSES = "auto-create-addresses";
+
+ private static final String AUTO_DELETE_ADDRESSES = "auto-delete-addresses";
+
private static final String MANAGEMENT_BROWSE_PAGE_SIZE = "management-browse-page-size";
private static final String MAX_CONNECTIONS_NODE_NAME = "max-connections";
@@ -696,6 +708,8 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
ArrayList deleteNonDurableQueue = new ArrayList<>();
ArrayList manageRoles = new ArrayList<>();
ArrayList browseRoles = new ArrayList<>();
+ ArrayList createAddressRoles = new ArrayList<>();
+ ArrayList deleteAddressRoles = new ArrayList<>();
ArrayList allRoles = new ArrayList<>();
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
@@ -726,6 +740,10 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
manageRoles.add(role.trim());
} else if (BROWSE_NAME.equals(type)) {
browseRoles.add(role.trim());
+ } else if (CREATEADDRESS_NAME.equals(type)) {
+ createAddressRoles.add(role.trim());
+ } else if (DELETEADDRESS_NAME.equals(type)) {
+ deleteAddressRoles.add(role.trim());
} else {
ActiveMQServerLogger.LOGGER.rolePermissionConfigurationError(type);
}
@@ -842,6 +860,14 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
addressSettings.setAutoCreateJmsTopics(XMLUtil.parseBoolean(child));
} else if (AUTO_DELETE_JMS_TOPICS.equalsIgnoreCase(name)) {
addressSettings.setAutoDeleteJmsTopics(XMLUtil.parseBoolean(child));
+ } else if (AUTO_CREATE_QUEUES.equalsIgnoreCase(name)) {
+ addressSettings.setAutoCreateQueues(XMLUtil.parseBoolean(child));
+ } else if (AUTO_DELETE_QUEUES.equalsIgnoreCase(name)) {
+ addressSettings.setAutoDeleteQueues(XMLUtil.parseBoolean(child));
+ } else if (AUTO_CREATE_ADDRESSES.equalsIgnoreCase(name)) {
+ addressSettings.setAutoCreateAddresses(XMLUtil.parseBoolean(child));
+ } else if (AUTO_DELETE_ADDRESSES.equalsIgnoreCase(name)) {
+ addressSettings.setAutoDeleteAddresses(XMLUtil.parseBoolean(child));
} else if (MANAGEMENT_BROWSE_PAGE_SIZE.equalsIgnoreCase(name)) {
addressSettings.setManagementBrowsePageSize(XMLUtil.parseInt(child));
}
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 c38b2cf2d7..f524062d3b 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 roles = SecurityFormatter.createSecurity(sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createNonDurableQueueRoles, deleteNonDurableQueueRoles, manageRoles, browseRoles, createAddressRoles);
+ Set 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.isAutoCreateJmsQueues()).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));
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 ffa0dbb9a8..86fdc14d17 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 +
"]";
}
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 12eac9f4d1..b10986484f 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();
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 30643639a6..dc73680d8d 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);
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 be71a927f3..184462b0f6 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();
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 833f8ce2bb..143b12e78c 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;
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 28d283d79e..23426ca388 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;
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 ea72beaaa1..9253e748f5 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 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 roles = storageManager.recoverPersistedRoles();
for (PersistedRoles roleItem : roles) {
- Set setRoles = SecurityFormatter.createSecurity(roleItem.getSendRoles(), roleItem.getConsumeRoles(), roleItem.getCreateDurableQueueRoles(), roleItem.getDeleteDurableQueueRoles(), roleItem.getCreateNonDurableQueueRoles(), roleItem.getDeleteNonDurableQueueRoles(), roleItem.getManageRoles(), roleItem.getBrowseRoles(), roleItem.getCreateAddressRoles());
+ Set 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
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 a92e8d332b..9653a4e4f6 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);
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 a211a9650b..0a1d09c99e 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);
}
}
}
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 f6da245ed7..a2be58b47f 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;
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 88ab0c014c..70177f4a66 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;
}
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 68d96568a3..a63ee9b056 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, Serializable
slowConsumerPolicy +
", autoCreateJmsQueues=" +
autoCreateJmsQueues +
- ", autoDeleteJmsQueues=" + autoDeleteJmsQueues +
+ ", autoDeleteJmsQueues=" +
+ autoDeleteJmsQueues +
", autoCreateJmsTopics=" +
-// autoCreateJmsTopics +
-// ", autoDeleteJmsTopics=" +
+ autoCreateJmsTopics +
+ ", autoDeleteJmsTopics=" +
autoDeleteJmsTopics +
+ ", autoCreateQueues=" +
+ autoCreateQueues +
+ ", autoDeleteQueues=" +
+ autoDeleteQueues +
+ ", autoCreateAddresses=" +
+ autoCreateAddresses +
+ ", autoDeleteAddresses=" +
+ autoDeleteAddresses +
", managementBrowsePageSize=" +
managementBrowsePageSize +
"]";
diff --git a/artemis-server/src/main/resources/schema/artemis-configuration.xsd b/artemis-server/src/main/resources/schema/artemis-configuration.xsd
index 3e166fd0ad..5e5f0b9469 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 @@
- 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
@@ -2416,7 +2416,7 @@
- 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
@@ -2424,7 +2424,7 @@
- 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
@@ -2433,7 +2433,42 @@
- 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
+
+
+
+
+
+
+
+ whether or not to automatically create a queue when a client sends a message to or attempts to consume
+ a message from a queue
+
+
+
+
+
+
+
+ whether or not to delete auto-created queues when the queue has 0 consumers and 0 messages
+
+
+
+
+
+
+
+ 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
+
+
+
+
+
+
+
+ whether or not to delete auto-created addresses when it no longer has any queues
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 3e9865d409..a1adb4c617 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());
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 5274db6e45..a2b3d44018 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));
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 3861782464..6a6ec55ffc 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
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 b8678ae8a6..ed272c428e 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());
HashSet 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 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 hashSet = securityRepository.getMatch("queues.another.andanother");
@@ -89,8 +89,8 @@ public class RepositoryTest extends ActiveMQTestBase {
public void testWithoutWildcard() {
securityRepository.addMatch("queues.1.*", new HashSet());
HashSet 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 hashSet = securityRepository.getMatch("queues.2.aq");
Assert.assertEquals(hashSet.size(), 2);
diff --git a/artemis-server/src/test/resources/ConfigurationTest-full-config.xml b/artemis-server/src/test/resources/ConfigurationTest-full-config.xml
index 70e344e6a3..81829f565f 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 @@
true
true
true
+ true
+ true
+ true
+ true
a2.1
@@ -284,6 +288,10 @@
false
false
false
+ false
+ false
+ false
+ false
diff --git a/artemis-tools/pom.xml b/artemis-tools/pom.xml
index 9ce22fd583..b28f3e51fe 100644
--- a/artemis-tools/pom.xml
+++ b/artemis-tools/pom.xml
@@ -19,7 +19,7 @@
org.apache.activemq
artemis-pom
- 1.5.0-SNAPSHOT
+ 2.0.0-SNAPSHOT
ActiveMQ Artemis Tools
diff --git a/docs/user-manual/en/queue-attributes.md b/docs/user-manual/en/queue-attributes.md
index 22184aa989..7a8fe78ef5 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.
-1
NOTIFY
5
+ true
-
+
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 8134f2727f..3efae9ef0c 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.
- jms
netty-connector
500
true
@@ -81,7 +80,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-grouping/readme.html b/examples/features/clustered/clustered-grouping/readme.html
index 7bce8f236b..e066ca948a 100644
--- a/examples/features/clustered/clustered-grouping/readme.html
+++ b/examples/features/clustered/clustered-grouping/readme.html
@@ -37,7 +37,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>
@@ -60,7 +59,6 @@ under the License.
<cluster-connections>
<cluster-connection name="my-cluster">
- <address>jms</address>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<message-load-balancing>STRICT</message-load-balancing>
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 45200591ed..07e2c81a98 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.
- jms
netty-connector
500
true
@@ -81,7 +80,7 @@ under the License.
LOCAL
- jms
+ exampleQueue
5000
-1
30000
@@ -91,7 +90,7 @@ under the License.
-
+
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 4765f7a2ea..0d681c8118 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.
- jms
netty-connector
500
true
@@ -80,7 +79,7 @@ under the License.
REMOTE
- jms
+ exampleQueue
5000
@@ -88,7 +87,7 @@ under the License.
-
+
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 16bf2eb7bd..c3a637f706 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.
- jms
netty-connector
500
true
@@ -80,7 +79,7 @@ under the License.
REMOTE
- jms
+ exampleQueue
5000
@@ -88,7 +87,7 @@ under the License.
-
+
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 17809e541d..763f6aa37e 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.
- jms
netty-connector
500
true
@@ -83,7 +82,7 @@ under the License.
-
+
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 267eae78cd..da3ffa39ab 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.
- jms
netty-connector
500
true
@@ -82,7 +81,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-queue/readme.html b/examples/features/clustered/clustered-queue/readme.html
index b5fce8181d..a39fc4c6b4 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.
<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>
diff --git a/examples/features/clustered/clustered-queue/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-queue/src/main/resources/activemq/server0/broker.xml
index eb30a9096d..e0ee6e6039 100644
--- a/examples/features/clustered/clustered-queue/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-queue/src/main/resources/activemq/server0/broker.xml
@@ -67,7 +67,6 @@ under the License.
- jms
netty-connector
500
true
@@ -81,7 +80,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-queue/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-queue/src/main/resources/activemq/server1/broker.xml
index 531fed154c..84a80149c5 100644
--- a/examples/features/clustered/clustered-queue/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-queue/src/main/resources/activemq/server1/broker.xml
@@ -68,7 +68,6 @@ under the License.
- jms
netty-connector
500
true
@@ -82,7 +81,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-static-discovery-uri/readme.html b/examples/features/clustered/clustered-static-discovery-uri/readme.html
index 88931b9eba..0dc1205b56 100644
--- a/examples/features/clustered/clustered-static-discovery-uri/readme.html
+++ b/examples/features/clustered/clustered-static-discovery-uri/readme.html
@@ -40,7 +40,6 @@ under the License.
and to load balance the messages between the nodes.
<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>
diff --git a/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server0/broker.xml
index be093ab55a..90ae4a1338 100644
--- a/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server0/broker.xml
@@ -56,7 +56,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server1/broker.xml
index fc3bb2da1b..5245e12c0d 100644
--- a/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server1/broker.xml
@@ -56,7 +56,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server2/broker.xml b/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server2/broker.xml
index 608796f190..5f3f611327 100644
--- a/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server2/broker.xml
+++ b/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server2/broker.xml
@@ -52,7 +52,7 @@
-
+
diff --git a/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server3/broker.xml b/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server3/broker.xml
index 950f8cdcda..53ce43f3b1 100644
--- a/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server3/broker.xml
+++ b/examples/features/clustered/clustered-static-discovery-uri/src/main/resources/activemq/server3/broker.xml
@@ -53,7 +53,7 @@
-
+
diff --git a/examples/features/clustered/clustered-static-discovery/readme.html b/examples/features/clustered/clustered-static-discovery/readme.html
index 88931b9eba..0dc1205b56 100644
--- a/examples/features/clustered/clustered-static-discovery/readme.html
+++ b/examples/features/clustered/clustered-static-discovery/readme.html
@@ -40,7 +40,6 @@ under the License.
and to load balance the messages between the nodes.
<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>
diff --git a/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server0/broker.xml
index b1bfd11f6f..25361f5d62 100644
--- a/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server0/broker.xml
@@ -52,7 +52,6 @@ under the License.
- jms
netty-connector
500
true
@@ -68,7 +67,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server1/broker.xml
index 04125765d6..14cc4cab7d 100644
--- a/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server1/broker.xml
@@ -52,7 +52,6 @@ under the License.
- jms
netty-connector
500
true
@@ -68,7 +67,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server2/broker.xml b/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server2/broker.xml
index 98b8f04430..051de1e2eb 100644
--- a/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server2/broker.xml
+++ b/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server2/broker.xml
@@ -49,7 +49,6 @@
- jms
netty-connector
500
true
@@ -65,7 +64,7 @@
-
+
diff --git a/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server3/broker.xml b/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server3/broker.xml
index 40bef8798d..15f0245cc2 100644
--- a/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server3/broker.xml
+++ b/examples/features/clustered/clustered-static-discovery/src/main/resources/activemq/server3/broker.xml
@@ -49,7 +49,6 @@
- jms
netty-connector
500
true
@@ -65,7 +64,7 @@
-
+
diff --git a/examples/features/clustered/clustered-static-oneway/readme.html b/examples/features/clustered/clustered-static-oneway/readme.html
index 04334a5947..e7fb9354a3 100644
--- a/examples/features/clustered/clustered-static-oneway/readme.html
+++ b/examples/features/clustered/clustered-static-oneway/readme.html
@@ -46,7 +46,6 @@ under the License.
<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>
diff --git a/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server0/broker.xml
index 006b2ca85f..9abc109345 100644
--- a/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server0/broker.xml
@@ -51,7 +51,6 @@
- jms
netty-connector
500
true
@@ -67,7 +66,7 @@
-
+
diff --git a/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server1/broker.xml
index e1ec02b2af..734c216a57 100644
--- a/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server1/broker.xml
@@ -51,7 +51,6 @@
- jms
netty-connector
500
true
@@ -67,7 +66,7 @@
-
+
diff --git a/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server2/broker.xml b/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server2/broker.xml
index 2585fba10b..d08f9b3292 100644
--- a/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server2/broker.xml
+++ b/examples/features/clustered/clustered-static-oneway/src/main/resources/activemq/server2/broker.xml
@@ -49,7 +49,6 @@
- jms
netty-connector
500
true
@@ -62,7 +61,7 @@
-
+
diff --git a/examples/features/clustered/clustered-topic-uri/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-topic-uri/src/main/resources/activemq/server0/broker.xml
index 546e2e635a..7d147a393c 100644
--- a/examples/features/clustered/clustered-topic-uri/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-topic-uri/src/main/resources/activemq/server0/broker.xml
@@ -75,7 +75,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-topic-uri/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-topic-uri/src/main/resources/activemq/server1/broker.xml
index c7009f7b72..3140a0623e 100644
--- a/examples/features/clustered/clustered-topic-uri/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-topic-uri/src/main/resources/activemq/server1/broker.xml
@@ -73,7 +73,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-topic/readme.html b/examples/features/clustered/clustered-topic/readme.html
index e46fca8cde..a36fd05a5c 100644
--- a/examples/features/clustered/clustered-topic/readme.html
+++ b/examples/features/clustered/clustered-topic/readme.html
@@ -40,7 +40,6 @@ under the License.
and to load balance the messages between the nodes.
<cluster-connection name="my-cluster">
- <address>jms</address>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<message-load-balancing>STRICT</message-load-balancing>
diff --git a/examples/features/clustered/clustered-topic/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/clustered-topic/src/main/resources/activemq/server0/broker.xml
index a4e8ddef07..0385356584 100644
--- a/examples/features/clustered/clustered-topic/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/clustered-topic/src/main/resources/activemq/server0/broker.xml
@@ -69,7 +69,6 @@ under the License.
- jms
netty-connector
500
true
@@ -83,7 +82,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/clustered-topic/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/clustered-topic/src/main/resources/activemq/server1/broker.xml
index 78beec32d4..f03fb5f692 100644
--- a/examples/features/clustered/clustered-topic/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/clustered-topic/src/main/resources/activemq/server1/broker.xml
@@ -67,7 +67,6 @@ under the License.
- jms
netty-connector
500
true
@@ -81,7 +80,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/queue-message-redistribution/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/queue-message-redistribution/src/main/resources/activemq/server0/broker.xml
index 70ff4d4584..6df9b2bf32 100644
--- a/examples/features/clustered/queue-message-redistribution/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/queue-message-redistribution/src/main/resources/activemq/server0/broker.xml
@@ -67,7 +67,6 @@ under the License.
- jms
netty-connector
500
true
@@ -81,7 +80,7 @@ under the License.
-
+
@@ -97,7 +96,7 @@ under the License.
Setting it to a value > 0 means how long to wait before redistributing, if a consumer is closed
then another one quickly recreated you might want to set it thus, to avoid unnecessary
redistribution -->
-
+
0
diff --git a/examples/features/clustered/queue-message-redistribution/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/queue-message-redistribution/src/main/resources/activemq/server1/broker.xml
index 6fc6f32d7d..5fb5257740 100644
--- a/examples/features/clustered/queue-message-redistribution/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/queue-message-redistribution/src/main/resources/activemq/server1/broker.xml
@@ -68,7 +68,6 @@ under the License.
- jms
netty-connector
500
true
@@ -82,7 +81,7 @@ under the License.
-
+
@@ -98,7 +97,7 @@ under the License.
Setting it to a value > 0 means how long to wait before redistributing, if a consumer is closed
then another one quickly recreated you might want to set it thus, to avoid unnecessary
redistribution -->
-
+
0
diff --git a/examples/features/clustered/symmetric-cluster/readme.html b/examples/features/clustered/symmetric-cluster/readme.html
index 043057d574..78665d6a9c 100644
--- a/examples/features/clustered/symmetric-cluster/readme.html
+++ b/examples/features/clustered/symmetric-cluster/readme.html
@@ -53,7 +53,6 @@ under the License.
<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>
diff --git a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server0/broker.xml b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server0/broker.xml
index cd89de7310..bce8855a85 100644
--- a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server0/broker.xml
@@ -71,7 +71,6 @@ under the License.
- jms
netty-connector
500
true
@@ -85,7 +84,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server1/broker.xml b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server1/broker.xml
index d95a1cd134..a09039918a 100644
--- a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server1/broker.xml
@@ -69,7 +69,6 @@ under the License.
- jms
netty-connector
500
true
@@ -83,7 +82,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server2/broker.xml b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server2/broker.xml
index ef006fd558..50f3d27193 100644
--- a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server2/broker.xml
+++ b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server2/broker.xml
@@ -69,7 +69,6 @@ under the License.
- jms
netty-connector
500
true
@@ -83,7 +82,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server3/broker.xml b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server3/broker.xml
index a780aceaf9..14b8535608 100644
--- a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server3/broker.xml
+++ b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server3/broker.xml
@@ -69,7 +69,6 @@ under the License.
- jms
netty-connector
500
true
@@ -83,7 +82,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server4/broker.xml b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server4/broker.xml
index 20b622e05f..38a420281b 100644
--- a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server4/broker.xml
+++ b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server4/broker.xml
@@ -68,7 +68,6 @@ under the License.
- jms
netty-connector
500
true
@@ -82,7 +81,7 @@ under the License.
-
+
diff --git a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server5/broker.xml b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server5/broker.xml
index 033af4370b..b450f7b5cf 100644
--- a/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server5/broker.xml
+++ b/examples/features/clustered/symmetric-cluster/src/main/resources/activemq/server5/broker.xml
@@ -68,7 +68,6 @@ under the License.
- jms
netty-connector
500
true
@@ -82,7 +81,7 @@ under the License.
-
+
diff --git a/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml
index d5fcbf88b8..b3e052b785 100644
--- a/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server0/broker.xml
@@ -69,13 +69,12 @@ under the License.
- jms
netty-connector
500
5
true
- STRICT
+ OFF
1
@@ -104,7 +103,7 @@ under the License.
-
+
@@ -112,7 +111,7 @@ under the License.
-
+
@@ -120,7 +119,7 @@ under the License.
-
+
diff --git a/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml
index d849b10378..de6f79a3b9 100644
--- a/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/colocated-failover-scale-down/src/main/resources/activemq/server1/broker.xml
@@ -69,13 +69,12 @@ under the License.
- jms
netty-connector
500
5
true
- STRICT
+ OFF
1
@@ -102,7 +101,7 @@ under the License.
-
+
@@ -110,7 +109,7 @@ under the License.
-
+
@@ -118,7 +117,7 @@ under the License.
-
+
diff --git a/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml
index f569d39cec..c1d103f837 100644
--- a/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/colocated-failover/src/main/resources/activemq/server0/broker.xml
@@ -67,7 +67,6 @@ under the License.
- jms
netty-connector
500
true
@@ -100,7 +99,7 @@ under the License.
-
+
diff --git a/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml
index 71015e5189..0a33683255 100644
--- a/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/colocated-failover/src/main/resources/activemq/server1/broker.xml
@@ -67,7 +67,6 @@ under the License.
- jms
netty-connector
500
true
@@ -100,7 +99,7 @@ under the License.
-
+
diff --git a/examples/features/ha/ha-policy-autobackup/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/ha-policy-autobackup/src/main/resources/activemq/server0/broker.xml
index db98aa0b67..7d6b0a109e 100644
--- a/examples/features/ha/ha-policy-autobackup/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/ha-policy-autobackup/src/main/resources/activemq/server0/broker.xml
@@ -77,7 +77,6 @@ under the License.
- jms
netty-connector
500
true
diff --git a/examples/features/ha/ha-policy-autobackup/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/ha-policy-autobackup/src/main/resources/activemq/server1/broker.xml
index 760ce0d956..435444bfee 100644
--- a/examples/features/ha/ha-policy-autobackup/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/ha-policy-autobackup/src/main/resources/activemq/server1/broker.xml
@@ -77,7 +77,6 @@ under the License.
- jms
netty-connector
500
true
diff --git a/examples/features/ha/replicated-failback-static/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/replicated-failback-static/src/main/resources/activemq/server0/broker.xml
index f6fa349a9b..d7bdaecce9 100644
--- a/examples/features/ha/replicated-failback-static/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/replicated-failback-static/src/main/resources/activemq/server0/broker.xml
@@ -62,7 +62,6 @@ under the License.
- jms
netty-connector
netty-backup-connector
@@ -73,7 +72,7 @@ under the License.
-
+
diff --git a/examples/features/ha/replicated-failback-static/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/replicated-failback-static/src/main/resources/activemq/server1/broker.xml
index 9b89d8089d..0ef447d677 100644
--- a/examples/features/ha/replicated-failback-static/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/replicated-failback-static/src/main/resources/activemq/server1/broker.xml
@@ -64,7 +64,6 @@ under the License.
- jms
netty-connector
netty-live-connector
@@ -75,7 +74,7 @@ under the License.
-
+
diff --git a/examples/features/ha/replicated-failback/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/replicated-failback/src/main/resources/activemq/server0/broker.xml
index c7f47839ec..089bb7b71f 100644
--- a/examples/features/ha/replicated-failback/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/replicated-failback/src/main/resources/activemq/server0/broker.xml
@@ -78,7 +78,6 @@ under the License.
- jms
netty-connector
@@ -87,7 +86,7 @@ under the License.
-
+
diff --git a/examples/features/ha/replicated-failback/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/replicated-failback/src/main/resources/activemq/server1/broker.xml
index da5a656401..52aa7331fb 100644
--- a/examples/features/ha/replicated-failback/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/replicated-failback/src/main/resources/activemq/server1/broker.xml
@@ -79,7 +79,6 @@ under the License.
- jms
netty-connector
@@ -88,7 +87,7 @@ under the License.
-
+
diff --git a/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server0/broker.xml
index 43f16938fc..f6e061b8c4 100644
--- a/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server0/broker.xml
@@ -72,7 +72,6 @@ under the License.
- jms
netty-connector
@@ -81,7 +80,7 @@ under the License.
-
+
diff --git a/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server1/broker.xml
index 7f17fb8a94..5208153f30 100644
--- a/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server1/broker.xml
@@ -72,7 +72,6 @@ under the License.
- jms
netty-connector
@@ -81,7 +80,7 @@ under the License.
-
+
diff --git a/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server2/broker.xml b/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server2/broker.xml
index c5f06cc254..b43bd188f0 100644
--- a/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server2/broker.xml
+++ b/examples/features/ha/replicated-multiple-failover/src/main/resources/activemq/server2/broker.xml
@@ -72,7 +72,6 @@ under the License.
- jms
netty-connector
@@ -81,7 +80,7 @@ under the License.
-
+
diff --git a/examples/features/ha/replicated-transaction-failover/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/replicated-transaction-failover/src/main/resources/activemq/server0/broker.xml
index f8b076a972..b8fca09a93 100644
--- a/examples/features/ha/replicated-transaction-failover/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/replicated-transaction-failover/src/main/resources/activemq/server0/broker.xml
@@ -73,7 +73,6 @@ under the License.
- jms
netty-connector
@@ -82,7 +81,7 @@ under the License.
-
+
diff --git a/examples/features/ha/replicated-transaction-failover/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/replicated-transaction-failover/src/main/resources/activemq/server1/broker.xml
index f64af4e30b..9844163142 100644
--- a/examples/features/ha/replicated-transaction-failover/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/replicated-transaction-failover/src/main/resources/activemq/server1/broker.xml
@@ -73,7 +73,6 @@ under the License.
- jms
netty-connector
@@ -83,7 +82,7 @@ under the License.
-
+
diff --git a/examples/features/ha/scale-down/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/scale-down/src/main/resources/activemq/server0/broker.xml
index 559bb5aad2..dfb1e2c24b 100644
--- a/examples/features/ha/scale-down/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/scale-down/src/main/resources/activemq/server0/broker.xml
@@ -67,7 +67,6 @@ under the License.
- jms
netty-connector
500
5
@@ -84,7 +83,7 @@ under the License.
-
+
@@ -92,7 +91,7 @@ under the License.
-
+
@@ -101,7 +100,7 @@ under the License.
-
+
diff --git a/examples/features/ha/scale-down/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/scale-down/src/main/resources/activemq/server1/broker.xml
index 6211cd3163..9150adf72f 100644
--- a/examples/features/ha/scale-down/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/scale-down/src/main/resources/activemq/server1/broker.xml
@@ -68,7 +68,6 @@ under the License.
- jms
netty-connector
500
5
@@ -94,7 +93,7 @@ under the License.
-
+
diff --git a/examples/features/ha/transaction-failover/src/main/resources/activemq/server0/broker.xml b/examples/features/ha/transaction-failover/src/main/resources/activemq/server0/broker.xml
index 916fdf5903..ab54ff05db 100644
--- a/examples/features/ha/transaction-failover/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/ha/transaction-failover/src/main/resources/activemq/server0/broker.xml
@@ -75,7 +75,6 @@ under the License.
- jms
netty-connector
@@ -84,7 +83,7 @@ under the License.
-
+
diff --git a/examples/features/ha/transaction-failover/src/main/resources/activemq/server1/broker.xml b/examples/features/ha/transaction-failover/src/main/resources/activemq/server1/broker.xml
index 055f04a71d..04078779b0 100644
--- a/examples/features/ha/transaction-failover/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/ha/transaction-failover/src/main/resources/activemq/server1/broker.xml
@@ -74,7 +74,6 @@ under the License.
- jms
netty-connector
@@ -84,7 +83,7 @@ under the License.
-
+
diff --git a/examples/features/standard/bridge/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/bridge/src/main/resources/activemq/server0/broker.xml
index 83759019c3..ad123053cd 100644
--- a/examples/features/standard/bridge/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/bridge/src/main/resources/activemq/server0/broker.xml
@@ -50,8 +50,8 @@ under the License.
-
- jms.queue.sausage-factory
+
+ sausage-factory
@@ -59,8 +59,8 @@ under the License.
We specify a filter with the bridge, and a transformer too. The filter and transformer are optional -->
- jms.queue.sausage-factory
- jms.queue.mincing-machine
+ sausage-factory
+ mincing-machine
org.apache.activemq.artemis.jms.example.HatColourChangeTransformer
-1
@@ -74,7 +74,7 @@ under the License.
-
+
diff --git a/examples/features/standard/bridge/src/main/resources/activemq/server1/broker.xml b/examples/features/standard/bridge/src/main/resources/activemq/server1/broker.xml
index 4d6c6e58bf..9aa13924ba 100644
--- a/examples/features/standard/bridge/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/standard/bridge/src/main/resources/activemq/server1/broker.xml
@@ -45,7 +45,7 @@ under the License.
-
+
diff --git a/examples/features/standard/cdi/pom.xml b/examples/features/standard/cdi/pom.xml
index ade48c4e04..be344ebca1 100644
--- a/examples/features/standard/cdi/pom.xml
+++ b/examples/features/standard/cdi/pom.xml
@@ -137,6 +137,18 @@
org.apache.activemq.artemis.core.example.CDIExample
+
+ stop
+
+ cli
+
+
+ ${noServer}
+
+ stop
+
+
+
diff --git a/examples/features/standard/dead-letter/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/dead-letter/src/main/resources/activemq/server0/broker.xml
index a7f3030159..3325561ecb 100644
--- a/examples/features/standard/dead-letter/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/dead-letter/src/main/resources/activemq/server0/broker.xml
@@ -49,7 +49,7 @@ under the License.
-
+
@@ -61,8 +61,8 @@ under the License.
-
- jms.queue.deadLetterQueue
+
+ deadLetterQueue
3
diff --git a/examples/features/standard/delayed-redelivery/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/delayed-redelivery/src/main/resources/activemq/server0/broker.xml
index e4412b9d8f..7171ad03bb 100644
--- a/examples/features/standard/delayed-redelivery/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/delayed-redelivery/src/main/resources/activemq/server0/broker.xml
@@ -49,7 +49,7 @@ under the License.
-
+
@@ -61,7 +61,7 @@ under the License.
-
+
5000
diff --git a/examples/features/standard/divert/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/divert/src/main/resources/activemq/server0/broker.xml
index 9ad847c5d3..ac264c1648 100644
--- a/examples/features/standard/divert/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/divert/src/main/resources/activemq/server0/broker.xml
@@ -66,23 +66,23 @@ under the License.
-
- jms.queue.priceForwarding
+
+ priceForwarding
order-divert
- jms.queue.orders
- jms.topic.spyTopic
+ orders
+ spyTopic
false
prices-divert
- jms.topic.priceUpdates
- jms.queue.priceForwarding
+ priceUpdates
+ priceForwarding
org.apache.activemq.artemis.jms.example.AddForwardingTimeTransformer
@@ -94,8 +94,8 @@ under the License.
- jms.queue.priceForwarding
- jms.topic.newYorkPriceUpdates
+ priceForwarding
+ newYorkPriceUpdates
-1
newyork-connector
@@ -107,7 +107,7 @@ under the License.
-
+
diff --git a/examples/features/standard/divert/src/main/resources/activemq/server1/broker.xml b/examples/features/standard/divert/src/main/resources/activemq/server1/broker.xml
index 26d6d95ca0..778607eebb 100644
--- a/examples/features/standard/divert/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/standard/divert/src/main/resources/activemq/server1/broker.xml
@@ -50,7 +50,7 @@ under the License.
-
+
diff --git a/examples/features/standard/durable-subscription/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/durable-subscription/src/main/resources/activemq/server0/broker.xml
index 8e319fa462..08c7c40580 100644
--- a/examples/features/standard/durable-subscription/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/durable-subscription/src/main/resources/activemq/server0/broker.xml
@@ -47,7 +47,7 @@ under the License.
-
+
diff --git a/examples/features/standard/expiry/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/expiry/src/main/resources/activemq/server0/broker.xml
index 731baaab83..32805f1efe 100644
--- a/examples/features/standard/expiry/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/expiry/src/main/resources/activemq/server0/broker.xml
@@ -49,7 +49,7 @@ under the License.
-
+
@@ -61,8 +61,8 @@ under the License.
-
- jms.queue.expiryQueue
+
+ expiryQueue
diff --git a/examples/features/standard/http-transport/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/http-transport/src/main/resources/activemq/server0/broker.xml
index d1a4d2a70c..f91e249959 100644
--- a/examples/features/standard/http-transport/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/http-transport/src/main/resources/activemq/server0/broker.xml
@@ -47,7 +47,7 @@ under the License.
-
+
diff --git a/examples/features/standard/interceptor/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/interceptor/src/main/resources/activemq/server0/broker.xml
index 49e780bb6c..531829c78d 100644
--- a/examples/features/standard/interceptor/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/interceptor/src/main/resources/activemq/server0/broker.xml
@@ -51,7 +51,7 @@ under the License.
-
+
diff --git a/examples/features/standard/jms-bridge/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/jms-bridge/src/main/resources/activemq/server0/broker.xml
index cf211a7190..3b9df047d5 100644
--- a/examples/features/standard/jms-bridge/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/jms-bridge/src/main/resources/activemq/server0/broker.xml
@@ -41,7 +41,7 @@ under the License.
-
+
diff --git a/examples/features/standard/jms-bridge/src/main/resources/activemq/server1/broker.xml b/examples/features/standard/jms-bridge/src/main/resources/activemq/server1/broker.xml
index 8ec2378b0d..39089f835e 100644
--- a/examples/features/standard/jms-bridge/src/main/resources/activemq/server1/broker.xml
+++ b/examples/features/standard/jms-bridge/src/main/resources/activemq/server1/broker.xml
@@ -41,7 +41,7 @@ under the License.
-
+
diff --git a/examples/features/standard/jms-shared-consumer/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/jms-shared-consumer/src/main/resources/activemq/server0/broker.xml
index 8e319fa462..08c7c40580 100644
--- a/examples/features/standard/jms-shared-consumer/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/jms-shared-consumer/src/main/resources/activemq/server0/broker.xml
@@ -47,7 +47,7 @@ under the License.
-
+
diff --git a/examples/features/standard/jmx/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/jmx/src/main/resources/activemq/server0/broker.xml
index 90a617883e..b251d3716f 100644
--- a/examples/features/standard/jmx/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/jmx/src/main/resources/activemq/server0/broker.xml
@@ -50,7 +50,7 @@ under the License.
-
+