Java Reference
In-Depth Information
In the previous chapter, we discussed the first agent service: the M-let service.
This chapter continues the coverage of agent services by examining the relation
service. Consider the fact that a typical JMX agent may contain numerous MBeans,
managing many resources. In fact, applications can expose components or
resources through the use of several MBeans.
Additionally, multiple MBeans might be needed to solve a particular problem.
For instance, imagine that you receive an alert telling you that your customer
service application needs attention. You use its MBean to read a new customer
query, but then you must use a different MBean to process the query. In manage-
ment environments like this, keeping track of MBeans may be difficult. MBean
management in cases of executing an ordered workflow is different than the
MBean querying problem presented in chapter 8. The MBean querying service
will help you find specific MBeans, but it cannot help you determine the order in
which specific MBeans should be used to complete a task (or even which exposed
operation to invoke).
This chapter will show you how to manage MBeans that are intended to have
relationships. They can be related by the resource they manage or by being
members of the same workflow. The JMX relation service provides a way to vali-
date and manage MBeans as related groups, called relations.
11.1 Using the JMX relation service
Relations are objects that contain information describing the relationship
between two MBeans. Each relation object must conform to a particular relation
type. A relation type is an object that resides in the relation service and allows the
service to validate relations. Relation types define the specific roles that MBeans
represent in a relationship.
The JMX relation service, like the M-let service described in chapter 10, is an
MBean registered in an agent. The service manages a group of registered relations
that users can query. Rather than look for many MBeans residing in an agent
that make a logical unit, you can query the relation service for an existing rela-
tion that will provide the MBean information you need (the ObjectName value).
In addition, the relation service maintains the consistency of registered rela-
tions against their particular relation types. As MBeans are added and removed
from an agent, the relation service will continuously check its registered relations
to ensure they still validate against their particular relation types. For example,
consider a relation type that defines a relation as having one MBean of type A
and one of type B. If an MBean of type A is removed from an existing relation of
Search WWH ::




Custom Search