Java Management Extensions

Java Management Extensions (JMX ) is a from the Java Community Process (JSR -3) specification developed for managing and monitoring Java applications. Parts of the JMX specification are already integrated 1.5 standard API in Java 6 and were greatly expanded with Java. JMX technology is not only suitable to control the behavior of systems, but also facilitates the communication of various Java applications. In the original JMX API only supported communication within a JVM (Java Virtual Machine), but since the Java version 6 also communicate with other JVM was supported. This is possible by the support of adapters and connectors. Thus it is easy to implement an HTTP adapter and the application is controlled via a web browser. Should the system be integrated into an existing network administrated, can be added to the Application Adapter for WBEM SNMP or CIM /.


JMX is divided into three main levels.

The instrumentation level the so-called MBeans are registered. These Java objects are managed by the so-called agents. About the Distributed service level can be accessed directly on the MBeans. The visibility is defined in the MBeans. There are ready-to- HTTP adapter for JMX available, making it possible to change directly from a web browser values ​​of a Java application.


JConsole is a GUI program from Sun, which can be used to manage MBeans. It comes standard since JDK 1.5.

Types of MBeans ( Managed Beans )

To cope with the variety of tasks different types of MBeans have prevailed in recent years.

  • Standard MBean
  • Dynamic MBean
  • Model MBean
  • Open MBean

The standard MBeans can be formed by the definition of interfaces whose name ends with " MBean ".

Dynamic MBeans are built at run time and can be changed during runtime. Currently, attributes and methods can be described only in the dynamic MBeans. Only with the help of this annotation will also be possible for standard MBeans.

The Model MBeans are very similar to the dynamic, but add a " read" and "write " method, with the values ​​in a file or in a database is stored. This OnTimer functions can be used, or the Notification handler can be defined a log feature. Another advantage of the model MBeans is that they can be generated directly in the agent.

The Open MBeans have only the standard Java types are available, but with this property, they have better options with other programs outside the project to communicate.

Services JMX

JMX also provides various services that are of interest to the handling and monitoring.

  • M-Let service
  • Timer service
  • Monitor

Let the M- service offers the possibility of, while the execution time reload classes. About a version control are used to automate this process, while the bootstrap class -loader will be used.

The timer service can perform periodic system observations. It will be thrown at pre-determined intervals Notification, which can be caught and handled by a listener.

With the Monitor class, individual variables ( observables ) can be observed an MBean without their internal structure must be known. Derived from this screen, there are three types.

  • Counter monitor
  • Gauge monitor
  • String Monitor

The counter monitor is suitable mainly for periodic observations. The gauge monitor can monitor the fulfillment of pre-defined boundaries and raises when the event occurs, a Notification. The monitor monitors the string observables if they remain the same or whether they change.


The following Java applications (including application servers and servlet containers) provide an implementation of JMX, which goes beyond the since Java 5 with the Java Runtime Environment shipped Implementation: