This section of the tutorial provides an overview of the JMX architecture and its components. A brief discussion of the management feedback loop and JMX's role in it follows.
The Java™ Management Extensions (JMX) Instrumentation and Agent Specification, v1.0 defines an architecture and services for application and network management. JMX provides a standard mechanism for management of Java-based resources and management through the Java platform. The diagram below illustrates the JMX architecture.
The architecture is divided into three levels:
JMX instrumentation provides mechanisms for describing and accessing JMX Managable Resources. JMX Managable Resources are those aspects of a domain that provide some management interface to the user or administrator. JMX Managable Resources can be developed as pure Java applications or application components or they can be Java wrappers around native resources.
MBeans are the concrete representations of JMX Managable Resources. MBeans come in two basic types: standard and dynamic. The JMX Specification provides a detailed description of these basic types and their subtypes.
The Agent Level of the architecture is responsible for combining JMX intrumentation and JMX services and providing a uniform interface to them to components of the Distributed Services layer. Conceptually a JMX Agent is composed of an MBeanServer instance, a set of MBeans representing managed resources, a minimum number of agent services implemented as MBeans, and at least on protocol adaptor or connector server. The agent may be part of a daemon process running on a machine or it may be embedded within the application being managed.
In the first version of the JMX specification this level of the architecture is unspecified. However its role is clear: it connects the JMX Agent to the external world of management consoles and applications.
Runtime management of resources is illustrated in the diagram below
Events or attribute changes in the managed resources trigger higher level events in the monitor(s) listening/watching for those events/changes. These higher level events are sent to a decision maker. This decision maker may be a human sitting at a management console. The decision maker may also be another software component. The decision maker is responsible for taking an appropriate action in response to the event. Those actions are then turned into control directives that act on the managed resources.
In the JMX model managed resources are MBeans. The JMX monitors are service MBeans that are part of the JMX agent level. JMX doesn't specify any standard decision makers. However, in the case where the decision maker is a software component it would also be a service MBean registered with the MBeanServer. Control directives are carried out by invoking methods or setting attributes on specific MBeans via the MBeanServer interface.