Table of Contents

What is JMX?

JMX (Java Management Extensions) is a Java technology that supplies tools for managing and monitoring resources such as:

Using the JMX technology, a given resource is instrumented by one or more Java objects known as Managed Beans, or MBeans. These MBeans are registered in a core-managed object server, known as an MBean server.

The API includes remote access, so a remote management program can interact with a running application for these purposes.

Since 1.5 - Standard Edition (J2SE) 5.0

Usage

Typical uses include:

  • consulting and changing application configuration
  • accumulating statistics about application behavior and making them available
  • notifying of state changes and erroneous conditions.

Architecture

Instrumentation

To manage resources using JMX technology, you must first instrument the resources in the Java programming language. You use Java objects known as MBeans to implement the access to the instrumentation of resources.

Once a resource has been instrumented by MBeans, it can be managed through a JMX agent.

In addition, the instrumentation level specifies a notification mechanism. This allows MBeans to generate and propagate notification events to components of the other levels.

JMX Agent

A JMX agent is a standard management agent that directly controls resources and makes them available to remote management applications.

Remote Management

JMX API instrumentation can be accessed in many different ways, either:

JMX technology provides a standard solution for exporting JMX API instrumentation to remote applications, based on Remote Method Invocation (RMI).

The JMX Remote API specification describes how you can advertise and find JMX agents using existing discovery and lookup infrastructures.

The specification does not define its own discovery and lookup service. The use of existing discovery and lookup services is optional: alternatively you can encode the addresses of your JMX API agents in the form of URLs, and communicate these URLs to the manager.

How to

Enable JMX

You must enable the use of JMX in your application.

  • To use JMX, you must enable it on your application server, by carrying out the steps under the documentation
  • For stand-alone application, add the startup parameter -Dcom.sun.management.jmxremote
java -Dcom.sun.management.jmxremote -jar jdk_home/demo/jfc/Notepad/Notepad.jar

Documentation / Reference