Getting Started with the Java Dynamic Management Kit 4.0

Registering MBeans

To enable an MBean to be managed by a Java Dynamic Management agent, register it in the MBean server. Registering an MBean does not necessarily require any modification of code. You can write the MBean so that it can control its own registration, should you wish to do so.

An MBean is registered by code in the agent which is to manage the MBean's resources. The Java Dynamic Management Kit enables you to register an existing MBean instance or to instantiate and register an MBean in a single operation. When registered, an MBean is assigned an object name by the user. If the user does not give the object a name then the object can assign a name for itself.

An MBean can also be instantiated and registered remotely by code in a Java Dynamic Management client.

Regardless of the registration operation, the MBean server generates a notification whenever an MBean is registered. The information sent with the notification includes the object name of the new MBean.