JMX (Java Management Extensions) is a Java technology that supplies tools for managing and monitoring resources such as:
Because JMX technology is dynamic, you can use it to monitor and manage resources as they are created, installed and implemented. You can also use JMX technology to monitor and manage the Java Virtual Machine1 (Java VM).
JMX (Java Management eXtensions) is a technology for:
The API includes remote access, so a remote management program can interact with a running application for these purposes.
Typical uses include:
The fundamental notion of the JMX API is the MBean. An MBean is a named managed object representing a resource.
JMX technology was developed through the Java Community Process (JCP) as two closely related Java Specification Requests (JSRs):
The Specifications and Reference Implementations can be downloaded at: http://java.sun.com/products/JavaManagement/download.html
|JSR 3||Java VM||Instrumentation||Resources, such as applications, devices, or services, are instrumented using Java objects called Managed Beans (MBeans). MBeans expose their management interfaces, composed of attributes and operations, through a JMX agent for remote management and monitoring.|
|JSR 3||Java VM||JMX Agent||The main component of a JMX agent is the MBean server. This is a core managed object server in which MBeans are registered. A JMX agent also includes a set of services for handling MBeans. JMX agents directly control resources and make them available to remote management agents.|
|JSR 160||Remote||Remote Management||Protocol adaptors and standard connectors make a JMX agent accessible from remote management applications outside the agent’s Java Virtual Machine (Java VM).|
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.
The Java Virtual Machine (Java VM) is highly instrumented using JMX technology. You can easily start a JMX agent to access the built-in Java VM instrumentation, and thereby monitor and manage the Java VM remotely by means of JMX technology.
A JMX agent is a standard management agent that directly controls resources and makes them available to remote management applications.
JMX agents are usually located on the same machine as the resources they control, but this is not a requirement.
The core component of a JMX agent is the MBean server, a managed object server in which MBeans are registered.
A JMX agent also includes a set of services to manage MBeans, and at least one communications adaptor or connector to allow access by a management application.
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.
A management application uses the object name to identify the object on which it is to perform a management operation. The operations available on MBeans include:
JConsole is a readily available JMX client that is included with Sun's Java Developer Kit (version 5 onwards).
You must enable the use of JMX in your application.
java -Dcom.sun.management.jmxremote -jar jdk_home/demo/jfc/Notepad/Notepad.jar
The Java Virtual Machine (Java VM) is highly instrumented using the JMX technology. You can start a JMX agent to access the built-in Java VM instrumentation, and thereby monitor and manage a Java VM remotely.
To monitor and manage different aspects of the Java VM, the Java VM includes a platform MBean server and special MXBeans for use by management applications