We have now covered one instrumentation approach in detailthe Standard MBean. MBeans were defined, the naming conventions involved with declaring a management interface with the Standard MBean were discussed, how management attributes and operations are declared, and how the agent finds them introspecting the MBean interface.
The naming conventions allow you to declare read-only, write-only, and read-write access to the management attributes. Also important to remember are the inheritance rules that the agent uses to determine the exposed management interface.
In the last part of this chapter, you had an in-depth look into the notification system defined by the JMX specification and all the related classes. Notifications are an important mechanism used to implement some of the standard agent services that will be covered in Chapter 7.
Standard MBeans are fairly easy to create and useful when creating new resources for management. They are quick to implement and offer statically typed interfaces for robustness. However, they might become inflexible when the management interface is expected to change often, or when you need to be able to determine the management interface at runtime instead of compile time. In those cases, Dynamic MBeans might suit your needs better. We are going to look at the Dynamic MBeans in Chapter 4.