Chapter 4. Model MBeans
Model MBeans are the most powerful type of MBean. Instrumenting your
application resources as model MBeans provides you with the most
features and flexibility of any of the MBean types that are fully
specified by the current JMX specification. Furthermore, this power
comes without a commensurate level of complexity! In this chapter, we
will examine the features provided by model MBeans and why you might
choose this instrumentation strategy over the others we have
discussed so far. Then we will look at how model MBeans work,
including a detailed look at the Descriptor class
and the metadata classes that are used by resources instrumented as
model MBeans. We will also take a look at
RequiredModelMBean, a model MBean class that is
required to be present in every JMX implementation. Finally, we will
develop a working example that uses the same design as the examples
of the previous chapters, so you can compare and contrast model
MBeans with standard and dynamic MBeans.
An entire book could be devoted to model MBeans, as they are by far the most complex type of MBean. The objective of this chapter is simply to familiarize you sufficiently with the major issues involved in instrumenting your resources as model MBeans that you can do so.
Tip
This chapter assumes that you have read the previous chapter, or are
familiar with dynamic MBeans. You should be familiar with the
DynamicMBean interface and how to use metadata classes to describe an MBean’s management interface. ...