How to Use JMX to Monitor JVM under GlassFish V1, V2 ...
In GlassFish V1 and V2, a JMX Connector Server is always available out of the box. This is how it looks like:
What this means is:
- There is an RMI Registry that's started in process. This acts as a naming service to download the RMI stub from. This is how the "standard" JMX RMI Connector Server (that's integrated into Java SE 5.0) works.
- One does not have to pass the properties:
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
to the VM.
- This is a non-secure RMI connection. You have to make sure yourself that you are connecting to the "right" server.
Here is the process (well, not really) to see the JVM MBeans in action:
- Start the server (asadmin start-domain).
- Start JConsole and connect to the server thus:
- Browse to the MBeans tab and see all the JVM Monitoring MBeans yourself.
- The same data is available in admin console and admin CLI (asadmin get command) when the VM monitoring level is turned to high.