Documentation Contents
Contents | Previous | Next

Chapter   2

JMX Architecture

JMX technology provides a standard API for management and monitoring of resources. The API includes remote access, so a remote management application can manage and monitor applications, systems, and networks. This chapter outlines JMX architecture in the following sections:

Architecture Outline

JMX technology is defined by two closely related specifications developed through the Java Community Process (JCP) as Java Specification Request (JSR) 3 and JSR 160:

The following table shows that the management architecture can be broken down into three levels. The first two levels shown in the table, instrumentation and agent,

Java VM are defined by JSR 3. The remote management level is defined by JSR 160.

TABLE 2-1  –  JMX Technology Architecture
Level
Description
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.
 
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.
 
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).

Instrumenting Resources Using MBeans

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. MBeans must follow the design patterns and interfaces defined in the specification. This ensures that all MBeans provide the instrumentation of managed resources in a standardized way.

Once a resource has been instrumented by MBeans, it can be managed through a JMX agent. MBeans do not require knowledge of the JMX agent with which they will operate.

MBeans are designed to be flexible, simple, and easy to implement. Developers of applications, systems, and networks can make their products manageable in a standard way without having to understand or invest in complex management systems. Existing resources can be made manageable with minimum effort.

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

Creating a JMX Agent

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.

When you implement a JMX agent, you do not need to know the semantics or functions of the resources that it will be used to manage. In fact, a JMX agent does not even need to know which resources it will serve, because any resource instrumented in compliance with the JMX specification can use any JMX agent that offers the services it requires. Similarly, the agent does not need to know the functions of the management applications that will access it.

Managing Resources Remotely

JMX API instrumentation can be accessed in many different ways, either through existing management protocols such as the Simple Network Management Protocol (SNMP), or through proprietary protocols. The MBean server relies on protocol adaptors and connectors to make a JMX agent accessible from management applications outside the agent’s Java Virtual Machine (Java VM).

Each adaptor provides a view through a specific protocol of all MBeans registered in the MBean server. For example, an HTML adaptor could display an MBean in a Web browser.

Connectors provide a manager-side interface that handles the communication between manager and JMX agent. Each connector provides the same remote management interface though a different protocol. When a remote management application uses this interface, it can connect to a JMX agent transparently through the network, regardless of the protocol.

JMX technology provides a standard solution for exporting JMX API instrumentation to remote applications, based on Remote Method Invocation (RMI). In addition, the JMX Remote API defines an optional protocol based directly on TCP sockets, called the JMX Messaging Protocol (JMXMP). An implementation of the JMX Remote API does not have to support this optional protocol. The Java SE platform does not include the optional protocol. See Appendix A, "JMX Technology Versions" for further information.

The JMX Remote API specification describes how you can advertise and find JMX agents using existing discovery and lookup infrastructures. Examples of how to do this are provided and are described in the Java Management Extensions (JMX) Technology Tutorial. 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.

 


Contents | Previous | Next

 


Oracle and/or its affiliates Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved.
Contact Us