You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2017/03/15 14:00:17 UTC
activemq git commit: https://issues.apache.org/jira/browse/AMQ-6629
Repository: activemq
Updated Branches:
refs/heads/master 36689beff -> 44a318bd3
https://issues.apache.org/jira/browse/AMQ-6629
Allow for broker stats to be viewed in tests by enabling JMX but
disabling the creation of a management connector.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/44a318bd
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/44a318bd
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/44a318bd
Branch: refs/heads/master
Commit: 44a318bd3fee7ecb26b591f73872ec58d0aaccc6
Parents: 36689be
Author: Timothy Bish <ta...@gmail.com>
Authored: Wed Mar 15 09:59:57 2017 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Wed Mar 15 09:59:57 2017 -0400
----------------------------------------------------------------------
.../org/apache/activemq/junit/EmbeddedActiveMQBroker.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/44a318bd/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java
----------------------------------------------------------------------
diff --git a/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java b/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java
index d1877ba..c90b8c3 100644
--- a/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java
+++ b/activemq-tooling/activemq-junit/src/main/java/org/apache/activemq/junit/EmbeddedActiveMQBroker.java
@@ -16,10 +16,13 @@
*/
package org.apache.activemq.junit;
+import static org.apache.activemq.command.ActiveMQDestination.QUEUE_TYPE;
+
import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Map;
+
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.JMSException;
@@ -45,8 +48,6 @@ import org.junit.rules.ExternalResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static org.apache.activemq.command.ActiveMQDestination.QUEUE_TYPE;
-
/**
* A JUnit Rule that embeds an ActiveMQ broker into a test.
*/
@@ -61,12 +62,13 @@ public class EmbeddedActiveMQBroker extends ExternalResource {
* <p>
* The defaults are:
* - the broker name is 'embedded-broker'
- * - JMX is disabled
+ * - JMX is enable but no management connector is created.
* - Persistence is disabled
*/
public EmbeddedActiveMQBroker() {
brokerService = new BrokerService();
- brokerService.setUseJmx(false);
+ brokerService.setUseJmx(true);
+ brokerService.getManagementContext().setCreateConnector(false);
brokerService.setUseShutdownHook(false);
brokerService.setPersistent(false);
brokerService.setBrokerName("embedded-broker");