[
https://issues.apache.org/jira/browse/AMQ-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13638036#comment-13638036
]
Timothy Bish commented on AMQ-4479:
-----------------------------------
There's already a check for this on line 2433 of BrokerService:
{code}
if (isUseJmx()) {
connector = registerConnectorMBean(connector);
}
{code}
> 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.6.0, 5.7.0, 5.8.0
> Environment: all environments.
> Reporter: instilled
> Priority: Minor
> Labels: patch
> Attachments: BrokerService.java.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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