MBeans are managed beans, Java objects that represent resources to be managed. An MBean has a management interface consisting of:

  • Named and typed attributes that can be read and written
  • Named and typed operations that can be invoked
  • Typed notifications that can be emitted by the MBean

Websphere application server provides a number of MBeans, each of which can have different function and operations available. For ex

a)  An application server MBean might expose operations such as start and stop.

b)  An application MBean might expose operations such as install and uninstall.

For example, an MBean representing an application’s configuration could have attributes representing the different configuration parameters, such as a cache size. Reading the CacheSize attribute would return the current size of the cache. Writing CacheSize would update the size of the cache, potentially changing the behavior of the running application. An operation such as save could store the current configuration persistently. The MBean could send a notification such as ConfigurationChangedNotification when the configuration changes.

MBeans can be standard or dynamic. Standard MBeans are Java objects that conform to design patterns derived from the JavaBeans component model. Dynamic MBeans define their management interface at runtime.

A standard MBean exposes the resource to be managed directly through its attributes and operations. Attributes are exposed through “getter” and “setter” methods. Operations are the other methods of the class that are available to managers. All these methods are defined statically in the MBean interface and are visible to a JMX agent through introspection. This is the most straightforward way of making a new resource manageable.

A dynamic MBean is an MBean that defines its management interface at runtime. For example, a configuration MBean could determine the names and types of the attributes it exposes by parsing an XML file.