Skip to main content

How to Use JMX to Monitor JVM under GlassFish V1, V2 ...

Posted by km on August 23, 2007 at 8:53 AM PDT

In GlassFish V1 and V2, a JMX Connector Server is always available out of the box. This is how it looks like:

<jmx-connector accept-all="false" address="" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="false"> <ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>


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:

    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.