me created AMQ-4479:
-----------------------
Summary: BrokerService attempts to connect to JMX even though the
broker url includes useJmx=false. Same behaviour when BrokerService#setUseJmx
is being used.
Key: AMQ-4479
URL: https://issues.apache.org/jira/browse/AMQ-4479
Project: ActiveMQ
Issue Type: Bug
Components: Broker
Affects Versions: 5.8.0
Environment: all environments.
Reporter: me
Attachments: BrokerService.java.patch
Configuring the BrokerService to not connect to JMX has no effect, no matter if
configured by broker uri, e.g. 'broker:(tcp://localhost:61616)?useJmx=false' or
setter, ie. BrokerService#setUseJmx(false). This is due to the
BrokerService#registerConnectorMBean not checking the value of
BrokerService#isUseJmx before attempting to create/retrieve the JMX beans.
Possible workaround:
{quote}
{{BrokerService broker =
BrokerFactory.createBroker("broker:(tcp://localhost:61616)?useJmx=false");}}
{{broker.getManagementContext().setCreateMBeanServer(false);}}
{{broker.getManagementContext().setCreateConnector(false);}}
{quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira