Sun Microsystems
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next
Part II

Agent Applications

The agent is the central component of the Java Management Extensions (JMX) management architecture. An agent contains MBeans and hides their implementation behind a standardized management interface, lets management applications connect and interact with all MBeans, and provides filtering for handling large numbers of MBeans. JMX agents are dynamic because resources can be added and removed, connections can be closed and reopened with a different protocol, and services can be added and removed as management needs evolve.

In Part I, Instrumentation Using MBeans, we saw how to represent resources as MBeans. However, MBeans can represent any object whose functionality you need to manage. In particular, management services and remote connectivity are handled by objects that are also MBeans. This creates a homogeneous model where an agent is a framework containing different kinds of MBeans and enabling them to interact.

The main component of an agent is the MBean server. It registers all MBeans in the agent and exposes them for management. The role of the MBean server is to be the liaison between any object available to be managed and any object with a management request. Usually resource MBeans are managed either by remote applications through connectivity MBeans or by local management service MBeans. This model allows a management service itself to be managed. Connectors and services can also be created, modified, or removed dynamically.

This part focuses on the functionality of the MBean server and the Java objects which are needed to create a simple agent. Details about programming managers and about using connectors and services will be covered in Part III, Remote Management Applications.

This part contains the following chapters:

  • Chapter 5, Base Agent describes the base agent. The base agent shows how to manipulate MBeans programmatically through the instance of the MBean server. This chapter covers the different ways of creating and interacting with MBeans in the MBean server. This chapter also describes how to process the metadata objects that represent MBean information.

  • Chapter 6, HTML Protocol Adaptor introduces the HTML protocol adaptor, which gives us a management view of the MBeans in an agent through a web browser. It lets us create MBeans, update their attributes, invoke their operations, and remove them dynamically in a running agent.

  • Chapter 7, MBean Server Interceptors shows how MBean interceptors can be used to modify the behavior of the MBean server.

  • Chapter 8, Notification Mechanism demonstrates the fundamentals of notification broadcasters and listeners where both are within the same agent. Since the MBean server delegate is a broadcaster, the example shows how to register a listener to process its events. The example also shows how to listen for attribute change notifications, a subclass of regular notifications that is defined by the JMX specification.

Previous Previous     Contents     Index     Next Next