mirror of https://github.com/apache/activemq.git
Allow for broker stats to be viewed in tests by enabling JMX but disabling the creation of a management connector.
This commit is contained in:
parent
dea1accb98
commit
c4f8361d52
|
@ -46,13 +46,14 @@ public class EmbeddedActiveMQBroker extends ExternalResource {
|
||||||
*
|
*
|
||||||
* The defaults are:
|
* The defaults are:
|
||||||
* - the broker name is 'embedded-broker'
|
* - the broker name is 'embedded-broker'
|
||||||
* - JMX is disabled
|
* - JMX is enabled but no management connector will be created.
|
||||||
* - Persistence is disabled
|
* - Persistence is disabled
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public EmbeddedActiveMQBroker() {
|
public EmbeddedActiveMQBroker() {
|
||||||
brokerService = new BrokerService();
|
brokerService = new BrokerService();
|
||||||
brokerService.setUseJmx(false);
|
brokerService.setUseJmx(true);
|
||||||
|
brokerService.getManagementContext().setCreateConnector(false);
|
||||||
brokerService.setUseShutdownHook(false);
|
brokerService.setUseShutdownHook(false);
|
||||||
brokerService.setPersistent(false);
|
brokerService.setPersistent(false);
|
||||||
brokerService.setBrokerName("embedded-broker");
|
brokerService.setBrokerName("embedded-broker");
|
||||||
|
|
Loading…
Reference in New Issue