About
A managed bean (MBean) is a Java object that represents a JMX manageable resource in a distributed environment, such as:
- an application,
- a service,
- a component
- or a device.
An MBean is a named managed object representing a resource.
Developers of applications and devices are free to choose the granularity of objects that are instrumented as MBeans. An MBean might represent:
- the smallest object in an application,
- or the entire application.
Application components designed with their management interface in mind can typically be written as MBeans. MBeans can also be used as wrappers for legacy code without a management interface or as proxies for code with a legacy management interface.
Type
The JMX specification defines five types of MBean:
- Dynamic MBeans
- Open MBeans
- Model MBeans
The simplest types of MBean are standard MBeans and MXBeans.
Management
Addressing
A management application uses the object name to identify the object on which it is to perform a management operation.
Interface
The management interface of an MBean consists of:
- A set of readable or writable attributes, or both.
- A set of invokable operations.
- A self-description.
- Typed notifications that can be emitted by the MBean
Object Reference
The Java class of a standard MBean exposes the resource to be managed directly through:
- its attributes: (such as the cache system is off). Attributes are internal entities that are exposed through getter and setter methods.
- and operations: Operations are the other methods of the class that are available to managers. All these methods are defined statically.