Java Dynamic Management Kit 3.2 Programming Guide | ||||
---|---|---|---|---|
![]() | ![]() | Chapter 8. Tools for Browsing M-Beans | ![]() | ![]() |
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.
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:
The agent contains an instance of an adaptor that communicates through an adaptor client. These adaptors are listed in Supported Protocols in Chapter 7.
The agent is running on a machine that the job tool can access using the protocol of the adaptor in the agent.
The compiled m-bean classes are stored at a location specified in the CLASSPATH environment variable of the agent.
The compiled c-bean classes are stored at a location specified in the CLASSPATH environment variable of the job tool.
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.
In a Solaris operating environment:
prompt% installDir/SUNWconn/jaw/bin/job |
In a Windows NT operating environment:
C:\> "installDir\SUNWconn\jaw\bin\job" |
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 |
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.
The Discovery window is opened as shown in Figure 8-4.
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.
The name of the agent is displayed in the text-entry field of the job tool window.
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.
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. |
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.
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 |
---|---|
| 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. |
| 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. |
| 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. |
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.
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.
A list of domains covered by the agent is added to the job tool window as shown in Figure 8-8.
Select the asterisk to view the m-bean instances in all domains. To remove the list of domains, set the Domains option to off.
The job tool enables you to preview an m-bean under development by:
Reading or writing the properties of an m-bean instance
Performing an action on an m-bean instance
Instantiating an m-bean
Deleting an m-bean instance
The properties of an m-bean instance are displayed in a separate window. An example is shown in Figure 8-9.
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.
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.
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.
For information, see Information for Instantiating an M-Bean.
![]() | ![]() | ![]() |
The M-Bean Browser Web Page | ![]() | Information for Instantiating an M-Bean |