Trail at java.sun.com
-- JMX Documentation
- An MBean is a resource (an object exposing methods).
- A JMX Agent exposes the MBean to the outside world. MBeans must
be registered with an agent to be usable. (JMX agent extends MBean Server.) MBeans are
registered / bound to an ObjectName.
- A JMX Connector is a client/server pair that exposes an MBean in a remote JVM.
domain - a useful convention is to begin the domain name with
the reverse DNS name of the organization that specifies the MBeans, followed by a
period and a string whose interpretation is determined by that organization.
- See javadoc
for escaping rules, patten matching, etc.
- attributes are implicitly defined by the existence of getters and setters.
- a getter is any public method that does not return
void and whose name begins with
is is also supported for methods returning
- a setter is any public method that takes a single parameter and whose name
- any other method is an operation.
An MBean must be of a
public concrete class with a public constructor if it is to be instantiated by a JMX
agent on demand from a management application.
Types of MBeans:
- Standard MBeans
- a Java interface called
- a Java class called
Something that implements that interface.
- the class and the interface names must match.
- An object may be wrapped in a
StandardMBean when the class and interface
names do not match.
- a type of MBean that references only a predefined set of data types.
- class name does not have to match the interface name.
- a Java interface called
-or- an interface annotated
- general principle is for simple types such as
to remain unchanged, while complex types such as
MemoryUsage get mapped to
the standard type
- On a complex return value, the MXBean framework calls all the getters on the
to convert the given instance into a
CompositeData instance and uses the
@ConstructorProperties annotation to reconstruct a
ReturnValue instance from a
- Dynamic MBeans
- must implement a specific interface, but they expose their management interface at
runtime for greatest flexibility.
DynamicMBean - Attributes and operations are exposed through
method calls on this interface.
- Open MBeans
- are dynamic MBeans that rely on basic data types for universal
manageability and that are self describing for user-friendliness.
- Model MBeans
- are also dynamic MBeans that are fully configurable and self
described at runtime; they provide a generic MBean class with default behavior
for dynamic instrumentation of resources.
- ((looks like an implementation of DynamicMBean that can be attached to an arbitrary
class at runtime to expose it as an MBean))
C o m m e n t s :