Java Dynamic Management Kit 3.2 Programming Guide | ||||
---|---|---|---|---|
![]() | ![]() | Chapter 1. Introduction to the Java Dynamic Management Kit | ![]() | ![]() |
Figure 1-1 shows how the key concepts for the Java Dynamic Management Kit relate to an agent and a manager. They are explained in the following subsections.
The core management framework (or, more briefly, the framework) is a registry for objects in an agent. Objects can be registered by:
The agent itself
A manager through an adaptor in the agent
Any object that you want to be managed from outside the framework must be registered. When you register an object, assign it an object name (see Object Name in Chapter 4). If you do not specify the object name explicitly, the Java Dynamic Management Kit assigns a default object name to the object when it is registered. A manager uses the object name to identify the object on which it is to perform a management operation. Any object registered with the framework must be an instance of an m-bean (see M-Beans).
The framework is a component supplied with the Java Dynamic Management Kit.
A managed bean, or m-bean, is a Java object that conforms to certain design patterns. These design patterns are derived from the JavaBeansTM component model and are described in detail in Chapter 3. They enable properties, actions, and events to be defined for an m-bean. They also enable you to make the distinction between a read-only and a read-write property in an m-bean. To comply with the design patterns for m-beans, an m-bean must be a JavaBeans component.
An m-bean instance is manageable as soon as it is registered with the framework. An m-bean can be instantiated and registered by:
An agent
A manager through an adaptor in an agent
Any object that you want to be accessible through the framework must be represented as an m-bean. Such objects include:
The resources you want an agent to manage
Services you want to provide for managing resources
You write the m-beans representing these objects yourself. Some components of the Java Dynamic Management Kit are implemented as m-beans.
While an agent is running, the m-beans are stored in the repository. The Java Dynamic Management Kit provides the following types of repository:
Volatile repository - all m-beans are stored in memory
Persistent repository - contains a mixture of m-beans stored in memory and in persistent storage
All the information in memory is lost when the agent is stopped. When an agent is started, it has to reload the information into the repository. Information in persistent storage is not lost when the agent is stopped.
The Java Dynamic Management Kit does not impose any restrictions on where compiled m-bean classes are stored. They can be stored at any location specified in the CLASSPATH environment variable of the agent, or at a remote site.
An adaptor connects the framework to external applications. It provides a view through a specific protocol of the m-beans instantiated and registered with the framework. An adaptor enables an external application to:
Find existing m-beans through their object names
Get or set properties of existing m-bean instances
Invoke methods on existing m-bean instances
Instantiate an m-bean and register the new m-bean instance
Receive events from known m-beans
For an agent to be manageable, it must include at least one adaptor. However, an agent can include any number of adaptors, enabling it to be managed remotely through different protocols.
Some adaptors have a server component and a client component. The client component provides a Java API for developing client applications (typically, managers). This API does not depend on the underlying protocol used.
Some adaptors have only a server component. They are accessed directly by an external application. For example, a web browser accesses the HTML adaptor directly. Similarly, an SNMP manager accesses the SNMP adaptor directly.
For information on how to use the adaptors, refer to Chapter 5.
A client bean, or c-bean, is a stub object that represents a remote m-bean to a manager developed with the adaptor client API. Like an m-bean, a c-bean is a JavaBeans component. The manager accesses an m-bean by performing operations on the c-bean, which are propagated to the m-bean, namely:
Getting or setting attributes
Method invocations
Events emitted by the m-bean are propagated to the c-bean.
A c-bean is generated from its m-bean by using the mogen compiler supplied with the Java Dynamic Management Kit. For information on how to use mogen, refer to Chapter 6. For information on how to use the adaptor client API, refer to Chapter 7.
![]() | ![]() | ![]() |
Overview | ![]() | Benefits of the Java Dynamic Management Kit |