...
3. Modify the "activemq" startup script (in bin) to enable the Java 1.5+ JMX connector
Find the "ACTIVEMQ_SUNJMX_START=" line and change it too the following: (note that in previous versions of ActiveMQ this property was called SUNJMX in some scripts. As of v5.12.0 all scripts use ACTIVEMQ_SUNJMX_START):
Code Block |
1. Windows
ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.password.file=%ACTIVEMQ_BASE%/conf/jmx.password \
-Dcom.sun.management.jmxremote.access.file=%ACTIVEMQ_BASE%/conf/jmx.access
2. Unix
ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password \
-Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
|
...
Code Block |
1. Windows
ACTIVEMQ_HOME=DRIVE_LETTER:/where/ActiveMQ/is/installed
ACTIVEMQ_BASE=%ACTIVEMQ_HOME%
ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.password.file=%ACTIVEMQ_BASE%/conf/jmx.password \
-Dcom.sun.management.jmxremote.access.file=%ACTIVEMQ_BASE%/conf/jmx.access
2. Unix
ACTIVEMQ_HOME=DRIVE_LETTER:/where/ActiveMQ/is/installed
ACTIVEMQ_BASE=${ACTIVEMQ_HOME}
ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password \
-Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access"
|
...
For example you can enable remote JMX connections to the Sun JMX connector, via setting the following environment variable (using set or export depending on your platform). These settings only configure the Sun JMX connector within Java 1.5+, not the JMX connector that ActiveMQ creates by default.
Code Block |
ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=1616 \
-Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
|
(The ACTIVEMQ_SUNJMX_START environment variable is simple used by the "activemq" startup script, as additional startup parameters for java. If you start ActiveMQ directly, you'll have to pass these parameters yourself.)
...