<document>
<header>
<product>resin</product>
<title>JMX Consoles</title>
<description>
<p>
JMX Consoles provide access to both the MBean's that Resin publishes for
information about and control of the Resin server and Application specific
MBeans.
</p>
</description>
</header>

<body>
<summary localtoc="true"/>

<s1 title="JDK 5.0 and JMX">

<p>
JDK 5.0 includes a JMX implementation that is used to provide 
local and remote administration of a Resin server.
</p>

<example title="Start Resin and allow local JMX administration">
win&gt; ./resin.exe -Dcom.sun.management.jmxremote
unix&gt; bin/resin.sh -Dcom.sun.management.jmxremote
</example>

<example title="Start jconsole">
win&gt; jconsole.exe
unix&gt; jconsole

<i>Choose Resin's JVM from the "Local" list.</i>
</example>

<example title="Start Resin and allow remote JMX administration">
win&gt; ./resin.exe -Dcom.sun.management.jmxremote.port=9999
unix&gt; bin/resin.sh -Dcom.sun.management.jmxremote.port=9999
</example>

<p>
Without some configuration effort, the previous command will not work.
Password configuration and SSL configuration is required by the JDK
implementation of remote JMX.  Detailed instructions are included in the JDK
documentation.
</p>

<p>
The following is useful for testing, but should be done with caution as the
port is not protected by password or by SSL, and if not protected by a firewall
is accessible by anyone who can guess the port number.
</p>

<example title="Start Resin and remote JMX - disable password checking and SSL">

win&gt; ./resin.exe -Dcom.sun.management.jmxremote.port=9999
                    -Dcom.sun.management.jmxremote.ssl=false
                    -Dcom.sun.management.jmxremote.authenticate=false

unix&gt; bin/resin.sh -Dcom.sun.management.jmxremote.port=9999 \
                      -Dcom.sun.management.jmxremote.ssl=false \
                      -Dcom.sun.management.jmxremote.authenticate=false
</example>

<example title="Start jconsole">
win&gt; jconsole.exe
unix&gt; jconsole

<i>Enter the host name and port number (9999) on the "Remote" tab</i>
</example>

<example title="Setting a password for remote JMX access">
$ cd $JAVA_HOME/jre/lib/management
$ cp jmxremote.password.template jmxremote.password
$ chmod u=rw jmxremote.password
$ vi jmxremote.password

<i>Set a password for "monitorRole" and "controlRole":</i>

monitorRole 12monitor
controlRole 55control
</example>

<example title="Start Resin and remote JMX - disable SSL">

win&gt; ./resin.exe -Dcom.sun.management.jmxremote.port=9999
                    -Dcom.sun.management.jmxremote.ssl=false

unix&gt; bin/resin.sh -Dcom.sun.management.jmxremote.port=9999 \
                      -Dcom.sun.management.jmxremote.ssl=false

</example>

<example title="Start jconsole">
win&gt; jconsole.exe
unix&gt; jconsole
</example>

<p>
<i>Enter the host name and port number (9999) on the "Remote" tab</i>
<i>Enter the username and password on the "Remote" tab</i>
</p>
</s1>

</body>
</document>
