MBeans and MXBeans

MBeans and MXBeans can be used to provide information about the state of a Java™ virtual machine (JVM). Additional MXBeans are provided with J9 that extend the monitoring and management capabilities.

MXBeans are a generalized variant of MBeans. Because MXBeans are constructed by using only a pre-defined set of data types, MXBeans can be referenced and used more easily by applications such as JConsole.

Start JConsole by running the command jconsole from a command line. When you connect to a running JVM, you see an MBeans tab. This tab displays a navigation tree that contains the MBeans exported by the JVM. The list of available MBeans depends on the version of Java that you are using. The java.lang.management package includes MBean categories such as Memory, OperatingSystem, and GarbageCollector.

Clicking an MBean category in the navigation tree shows you all the related MBeans that are available. Clicking an individual MBean shows you the information that the MBean extracts from the JVM, separated into the following sections:
Attributes
Information about the current state. You can use some MBeans to change the JVM options. For example, in the Memory MBean, you might select the Verbose option to enable VerboseGC logging output.
Operations
Detailed information from the JVM. For example, in the Threading MBean, you see thread information that helps you to monitor deadlocked threads.
Notifications
Notifications that are supported by the MBean. Applications such as JConsole receive information from the MBean by subscribing to these notifications.
Info
Details about the available notifications.

J9 MXBeans

J9 provides further MXBeans to extend the monitoring and management capabilities. For more information about the MXBean extensions, see the Language management interface section of the Eclipse OpenJ9 documentation.