1 Introduction to JMX Technology

If you are already familiar with Java Management Extensions (JMX) technology, see JMX Technology Versions for version information.

JMX technology provides a simple, standard way of managing resources such as applications, devices, and services. 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 Machine (Java VM).

JMX technology was developed through the Java Community Process (JCP) as two closely related Java Specification Requests (JSRs):

  • JSR 3: Java Management Extensions (JMX) Specification
  • JSR 160: Java Management Extensions (JMX) Remote API

The JSRs are defined by the API documentation that is generated by the JavaDoc tool, and in the Java Management Extensions (JMX) Specification, version 1.4 (JMX Specification).

As its name indicates, the JMX Remote API adds remote capabilities to the JMX Specification, enabling you to remotely monitor and manage applications, systems, and networks. In this guide, the term JMX technology is used to describe both the JMX Specification and the JMX Remote API.

This chapter introduces JMX technology in the following sections:

What Is JMX Technology?

The JMX Specification defines in the Java programming language an architecture, the design patterns, the APIs, and the services for application and network management and monitoring. The Java Management Extensions (JMX) technology is a standard part of the Java Platform, Standard Edition (Java SE platform).

When using JMX technology, one or more Java objects known as Managed Beans (MBeans) will instrument a specified resource. These MBeans are registered in a core managed object server, known as an MBean server. The MBean server acts as a management agent and can run on most devices enabled for the Java programming language.

The specification defines JMX agents you can use to manage resources that are instrumented in compliance with the specification. A JMX agent consists of an MBean server, in which MBeans are registered, and a set of services for handling MBeans. JMX agents directly control resources and make them available to remote management applications.

The way in which resources are instrumented is completely independent from the management infrastructure. Resources can therefore be rendered manageable regardless of how their management applications are implemented.

JMX technology defines standard connectors (JMX connectors) that enable you to access JMX agents from remote management applications. JMX connectors use different protocols to provide the same management interface. A management application can manage resources transparently, regardless of the communication protocol that is used. JMX agents can be used by systems and applications that are not compliant with the JMX Specification but which support JMX agents.

Why Use JMX Technology?

JMX technology provides Java developers with a flexible means to instrument Java code, create smart Java agents, implement distributed management middleware and managers, and smoothly integrate these solutions into existing management and monitoring systems.

  • JMX technology enables management of Java applications without heavy investment: A JMX technology agent can run on most Java technology-enabled devices, thus Java applications can become manageable with little impact on their design. A Java application needs to embed a managed object server and make some of its functionality available as one or several managed beans (MBeans) registered in the object server; that is all it takes to benefit from the management infrastructure.
  • JMX technology provides a standard way to manage Java technology-based applications, systems, and networks: For example, the Java Platform, Enterprise Edition (Java EE) 5 Application Server conforms to the JMX architecture and consequently can be managed using JMX technology.
  • JMX technology can be used for out-of-the-box management of the JVM: The JVM is highly instrumented using JMX technology. You can start a JMX agent to access the built-in JVM instrumentation, and to monitor and manage the JVM remotely.
  • JMX technology provides a scalable, dynamic, management architecture: Each JMX agent service is an independent module that can be plugged in to the management agent. This component-based approach means that JMX solutions can scale from small-footprint devices to large telecommunications switches and beyond. The JMX Specification provides a set of core agent services. Additional services can be developed and dynamically loaded, unloaded, or updated in the management infrastructure.
  • JMX technology takes advantage of existing standard Java technologies: When needed, the JMX Specification references existing Java specifications, for example, the Java Naming and Directory Interface (JNDI).
  • JMX technology integrates with existing management solutions and emerging technologies: For example, JMX agents can be managed through an HTML browser. The JMX APIs provide open interfaces that any management system vendor can use.