Java Dynamic Management Kit 3.2 Programming Guide
[ Previous ][ Fast Back ]Chapter 1. Introduction to the Java Dynamic Management Kit[ Fast Forward ][ Next ]

Overview of the Development Process

The main steps in developing an application with the Java Dynamic Management Kit are:

Writing the M-Beans

When using the Java Dynamic Management Kit for agent development, you write Java classes that define your application. The only restriction imposed by the Java Dynamic Management Kit is that your classes must comply with the design pattern for m-beans described in Chapter 3.

Testing M-Beans With a Web Browser

After you have compiled your m-bean classes, you are able to use a web browser to test them. You do this by connecting a web browser to a running agent (for example, the default base agent), instantiating m-beans, and performing other operations on the m-bean instances. Before connecting a web browser to an agent, make sure that:

To use a web browser to communicate with an agent, open the page given by this URL in a web browser:
http://host:port

where:

The HTML page displayed is generated by the HTML adaptor and enables you to perform the following operations on m-beans in the agent:

For detailed instructions on how to use a web browser for testing m-beans in an agent, refer to The M-Bean Browser Web Page in Chapter 8.

Designing the Base Agent

A base agent is a container in which m-beans are instantiated and run. A base agent consists of:

A base agent can also contain m-beans instantiated when the base agent is started; optionally these last for the lifetime of the base agent. In designing the base agent you have to decide which m-beans you want to be instantiated when the agent is started, and which you want to be instantiated on demand.

An agent consists of a base agent and the m-beans instantiated during the lifetime of the base agent.

Generating a C-Bean

To generate a c-bean from an m-bean, use the mogen compiler. The m-bean classes input to mogen must be in the form of compiled Java classes, not source files.

A c-bean consists of two components:

For example, if you have an m-bean MyClass, the mogen compiler gives you a c-bean that consists of the following files:

For information on how to use mogen, refer to Chapter 6.

The mogen compiler generates Java source code, not compiled Java classes. For your c-beans to be accessible to a Java manager, you have to compile the files that mogen generates, and make sure that the compiled Java classes are stored at the location specified by the CLASSPATH environment variable of the manager.

Testing M-Beans With the job Tool

After you have generated c-beans, you are able to use the job tool for further testing. You do this by connecting the job tool to a running agent (for example, the default base agent), instantiating m-beans, and performing other operations on the m-bean instances. The job tool provides a graphical representation of m-beans in an agent. It is a simple example of a Java manager that can perform basic operations on m-beans in an agent.

Before using the job tool to communicate with an agent, make sure that:

To start the job tool, type the command for your operating environment:

prompt% installDir/SUNWconn/jaw/bin/job

C:\> "installDir\SUNWconn\jaw\bin\job"

The job tool window is opened. Before performing any operations on m-beans, you have to connect the job tool to an agent. Once connected, the job tool enables you to perform the following operations on m-beans in the agent:

For detailed instructions on how to use the job tool, refer to The job Tool in Chapter 8.

Developing a Manager in the Java Language

Use the adaptor client API to develop a manager in the Java language. The main steps in developing a Java manager are:

The interaction between an m-bean in an agent and a c-bean in a Java manager is shown in Figure 1-2.

For information on how to use the adaptor client API, refer to Chapter 7.

Figure 1-2. Interaction Between an M-Bean and a C-Bean

fig39.epsi


[ Previous ][ Home ][ Next ]
Product Components[ Up ]Tutorial Example