Instrumenting Resources by Using MBeans
To manage resources by using JMX technology, you must first instrument the
resources in the Java programming language. You can 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 JMX Specification to ensure
that all MBeans provide the instrumentation of managed resources in a standardized
way.
After a resource is instrumented by MBeans, it can be managed through a JMX agent.
MBeans do not require knowledge of the JMX agent with which they 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 investing in complex management systems. Existing resources
can be made manageable with minimum effort.
In addition, the instrumentation level of JSR 3: Java Management Extensions (JMX)
Specification specifies a notification mechanism that enables 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. A JMX agent is usually
located on the same system as the resources that it controls, 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 enable 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 the agent 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 offering
the services that it requires. In addition, 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 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 (JVM).
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
browser.
Connectors provide a manager-side interface that handles the communication
between the manager and the JMX agent. Each connector provides the same remote
Chapter 2
Instrumenting Resources by Using MBeans
2-2