Whats the proper way to enable JMX in ActiveMQ 5.2? I've seen conflicting documents, so I was wondering if anyone out there knows what the proper config file change should be. I think I might have it working by changing the batch file I use to start ActiveMQ, but I don't really know.
To disable JMX entirely you simply set the broker element's useJmx attribute to false . This will stop the broker from exposing itself via JMX. Disabling JMX will also disable the commands in the activemq shell.
You can monitor the status of the connection with the broker via the addTransportListener() method on the ActiveMQConnection. This method takes a TransportListener which is notified as the connection is established & dropped.
The JMX protocol allows remote monitoring and managing of Apache Tomcat. For more information, refer to Apache Tomcat Monitoring and Managing Tomcat. Which type of configuration should be used? If the Apache Tomcat instance is used for sandbox or test purposes, you can use the no authentication option.
<!-- Use the following to configure how ActiveMQ is exposed in JMX -->
<managementContext>
<managementContext createConnector="true" />
</managementContext>
Put this inside the bean of your broker in the activemq.xml file and it should do the trick. Your connector will be created in localhost:1099, and you shouldn't need to modify the batch file. Regards, Seb
with a default installation, just edit your /bin/activemq file and setup the ACTIVEMQ_SUNJMX_START property as follows...
ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With