Appendix B. Open MBeans

At the time when the first version of the JMX specification was released (1.0), the Open MBean specification was still incomplete and the Open MBeans were not fully specified. However, there are plans now to include an Open MBean implementation as part of the Maintenance Release of the Sun JMX Reference Implementation scheduled to be released sometime in the early 2002. This appendix will briefly touch on some of the main features of Open MBeans described in the JMX specification. Keep in mind, though, that Open MBeans are currently not required by the JMX implementations, and the JMX specification states that claiming a compliance at this time with regard to Open MBeans is not possible. There are plans to make Open MBeans a mandatory part of the specification in its next release.

Overview of Open MBeans

The main goal of the Open MBeans is to allow management applications to discover and understand new management object types at runtime. Normally, when you define custom classes as part of the management interface of an MBean, all the management applications require the same classes to be available to them to be able to use the management operations. On the other hand, Open MBeans rely on a predefined set of basic and universal data types that can be used to describe the management interface and management objects for complex types as well as the basic Java primary and string types.

Relying on the predefined types allows for increased flexibility in MBean component collaboration. A generic management application or another MBean can communicate with existing MBean components without requiring the custom runtime classes representing complex management data objects to be loaded to the system.

Open MBeans are extensions of the DynamicMBean interface. They do not require any additional interfaces to be implemented but do have to conform to the predefined data types to represent their management interfaces. Open MBeans also expose their management interface through specific metadata class implementations. An Open MBean uses OpenMBeanInfo, OpenMBeanAttributeInfo, OpenMBeanOperationInfo, OpenMBeanConstructorInfo, and OpenMBeanParameterInfo classes to expose its management interface.

Predefined Data Types

The predefined data types an Open MBean can use in its management interface are the object wrapper classes for the basic Java primary types (Integer, Long, Byte, Boolean, Float, Double, Short and Character), Java String class, and JMX ObjectName class. For complex data types, the JMX Open MBean specification defines two interfaces that can be used—CompositeData and TabularData. For arrays, the Open MBean specification defines an ArrayType class that can be used to represent either single or multi-dimensional arrays of the Open MBean data types.

The CompositeData and TabularData interfaces are used to represent complex types in Open MBeans. Both data types can contain any number and combination of the object wrappers of the primary types, strings, object names, arrays, or other CompositeData and TabularData objects. The implementation of the CompositeData interface is an equivalent of a hash map implementation. The contained types are added and retrieved based on a unique string key in the map.

The TabularData objects represent a table structure with any number of rows having any number of columns per row. Each row in a TabularData object must be a CompositeData object. Each CompositeData object must represent an identically structured data type. The TabularData object contains an index that is a subset of the types within each CompositeData object. The index must be a unique identifier for the row in a TabularData object and each method of the TabularData implementation must ensure the uniqueness of the index is preserved when new rows are added.

The CompositeData object must be immutable once it has been instantiated. This differs from the TabularData object, which allows rows to be added or removed even for existing instances.

Summary

The Open MBeans rely on a small, predefined set of data types that they must use to describe their management interface. This allows new management data and operations to be added at runtime without recompilation or dynamic linking. Open MBeans enables maximum flexibility of discovery of new management objects; administrators will be able to use new management data objects automatically through generic management tools.

However, the specification for the Open MBeans is not currently finished, so the Open MBean type is not mandatory for a compliant JMX implementation. Neither the Sun Reference Implementation or the Tivoli JMX implementation support the Open MBeans at the time of this writing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.72.176