Java Dynamic Management Kit 3.2 Programming Guide
[ Previous ][ Fast Back ]Chapter 8. Tools for Browsing M-Beans[ Fast Forward ][ Next ]

The job Tool

The job tool provides a graphical representation of the m-beans registered with an agent. It is a debugging tool that enables you to preview an m-bean under development by instantiating it and by performing operations on the m-bean instance. It is also an example of a simple Java manager.

Starting and Connecting the job Tool

When it is started, the job tool is not connected to an agent and no m-beans are displayed. You have to connect it to the agent whose m-beans you want to preview. Before trying to connect the job tool to an agent, make sure that:

To obtain a list of the agents that you can connect to, use the discovery option to discover them. This enables you to select the agent from a list. The job tool uses multicasting to discover agents. If you do not want to use the default parameters for discovery, you can change them.

To Start the job Tool

To Connect the job Tool to an Agent

  1. Before attempting to connect the job tool to a Java Dynamic Management agent, make sure that the agent is running.
  2. Type the name of the agent that you want to connect to, in the job tool text-entry field.

    If the adaptor in your agent uses the default settings, all you need to specify is the host name of the machine on which the agent is running. The default settings are RMI protocol and port 1099. If the adaptor in your agent does not use the default settings, you have to specify the protocol, host name and port in full as follows:
    protocol:hostname:port

  3. Click Connect.

    If security is implemented for the adaptor through which you connect to the agent, you are asked to type your login and password for accessing the agent.

To Connect to an Agent by Using the Discovery Option

  1. Click the button adjacent to the Connect button.

    The Discovery window is opened as shown in Figure 8-4.

  2. In the Discovery window, click Discover.

    A list of agents with a discovery responder listening on port 9000 that are running on your network is added to the main area of the Discovery window.

  3. From the list of agents, select the agent that you want to connect the job tool to.

    The name of the agent is displayed in the text-entry field of the job tool window.

  4. Click Connect.

    If security is implemented for the adaptor through which you connect to the agent, you are asked to type your login and password for accessing the agent.


    TIP: Double-clicking an agent in the Discovery window connects the job tool to the agent.


To Change the Default Discovery Parameters

  1. In the Discovery window, click Setup.
  2. In the Discovery Setup window, specify new values for these parameters:

    Time to Live

    The time to live for multicast packets. It must be a positive decimal integer.

    Multicast Group

    The multicast group that packets will be sent to. It must be an IP address.

    Multicast Port

    The port number for multicast packets.

  3. Click OK.

To Revert to the Default Discovery Parameters

The job Tool Window

By default, m-bean instances in an agent are represented as icons in the main area of the job tool window, as shown in Figure 8-6.

Figure 8-6. Icon Representation of M-Bean Instances in the job Tool Window

fig498.epsi

The icon that represents an m-bean instance depends on the characteristics of the m-bean instance, as shown in Table 8-1.

Table 8-1. Icons for the job Tool

Icon

Meaning

fig488.tiff

A c-bean exists for the m-bean. It is possible to use the job tool to examine the properties and actions of the m-bean.

The m-bean is not an instance of a base service. If you delete the instance, the agent will continue to work.

fig489.tiff

A c-bean does not exist for the m-bean. The properties and actions of the m-bean are not accessible to the job tool.

The m-bean is not an instance of a base service. If you delete the instance, the agent will continue to work.

fig490.tiff

The m-bean is an instance of a base service of the Java Dynamic Management agent. Do not delete an instance of a base service. If you do, the agent will no longer work.

Changing Your View of M-Beans

The job tool enables you to choose whether m-bean instances are represented as icons, or in a list. It also enables you to choose the domain of the m-bean instances that you want to view. The domain of an m-bean is part of its object name as explained in Object Name in Chapter 4.

To View M-Bean Instances as a List

The m-bean instances in an agent are represented as text in a list, as shown in Figure 8-7. Each item in the list is the object name of an m-bean instance in an agent. To return to an icon representation, select the Icon option.

Figure 8-7. List Representation of M-Beans in the job Tool Window

fig499.epsi

To Choose the Domain

  1. In the job tool window, set the Domains option to on.

    A list of domains covered by the agent is added to the job tool window as shown in Figure 8-8.

  2. From the list of the list of domains, select the domain of the m-bean instances you want to view.

    Select the asterisk to view the m-bean instances in all domains. To remove the list of domains, set the Domains option to off.

Operations on an M-Bean

The job tool enables you to preview an m-bean under development by:

To Read or Write the Properties of an M-Bean Instance

  1. In the job tool window, select the m-bean instance that you want to read or write the properties of.
  2. Click Properties.

    The properties of an m-bean instance are displayed in a separate window. An example is shown in Figure 8-9.

  3. In the properties window, make the changes to any read-write properties you want to change.

    The text-entry field for a read-write property is a different color from the window background. The text-display field for a read-only property is the same color as the window background.

  4. Click Apply to apply your changes.

    The properties window remains open. Click Close to close the properties window without applying any changes.


    TIP: The properties window is not automatically updated with changes to properties that have occurred since the window was opened. To update the properties displayed, click Refresh.


To Perform an Action on an M-Bean Instance

  1. In the job tool window, select the m-bean instance that you want to perform an action on.
  2. Click Actions.
  3. In the action window, click the action you want to perform.

    The action you want to perform must not take any arguments. Only actions that take no arguments are active in the method window. The names of actions that take one or more arguments are displayed but are grayed out and cannot be performed.

To Instantiate an M-Bean

  1. In the job tool window, click Create.
  2. In the Create Object window, specify the information required to instantiate the m-bean.

    For information, see Information for Instantiating an M-Bean.

  3. Click OK.

To Delete an M-Bean Instance

  1. In the job tool window, select the m-bean instance that you want to delete.

    Do not select an instance of a base service. If you delete a base service, the agent will no longer work.

  2. Click Delete.

    You are asked to confirm that you want to delete the m-bean instance.


[ Previous ][ Home ][ Next ]
The M-Bean Browser Web Page[ Up ]Information for Instantiating an M-Bean