Java Dynamic Management Kit 3.2 Programming Guide | ||||
---|---|---|---|---|
![]() | ![]() | Chapter 8. Tools for Browsing M-Beans | ![]() | ![]() |
The HTML adaptor enables you to use a web browser to preview m-beans in an agent. The HTML adaptor obtains management information from m-beans and generates web pages representing this information. These web pages enable you to perform management operations on m-beans.
The ability to "browse" m-beans through the HTML adaptor is intended to be a simple debugging tool. As such, it has certain limitations on the characteristics of the m-beans it can manipulate and display:
The interval between automatic reloads must be at least 5 seconds
Only properties whose types return a valid (non-null) string when toString() is called are displayed
Arrays of types that are not primitive types or their wrapper classes (for example, int and Integer) are displayed in read-only mode
Only m-bean actions (performAction()) that return void are displayed
Properties consisting of a multi-dimensional array are displayed, but you cannot view the sub-arrays, nor the final elements
Only the types listed below are supported as parameters of actions:
boolean, boolean[], Boolean, Boolean[]
byte, Byte, Byte[]
char, char[], Character, Character[]
short, Short, Short[]
int, int[], Integer, Integer[]
long, Long, Long[]
float, float[], Float, Float[]
double, double[], Double, Double[]
Number, Number[]
String, String[]
Date, Date[]
com.sun.jaw.reference.common.ObjectName, com.sun.jaw.reference.common.ObjectName[]
Note - In order to read a value for the abstract class Number, the HTML adaptor successively tries to convert the string to an Integer, a Long, a Float, then a Double, stopping at the first one which doesn't fail.
Before connecting a web browser to a Java Dynamic Management agent, make sure that:
The agent contains an instance of the HTML adaptor.
The agent is running on a machine that you can access using the HTTP protocol.
The compiled m-bean classes are stored at a location specified in the CLASSPATH environment variable of the agent.
To connect a web browser to a Java Dynamic Management agent, open this page in a web browser:
http://host:port |
where:
host is the host name of the machine on which the agent is running.
port is the port number used by the HTML adaptor in the agent. By default it is 8082.
If security is implemented for the HTML adaptor in the agent, you are asked to type your login and password for accessing the agent.
The m-bean browser web page is opened in the web browser. An example of its content is shown in Figure 8-1.
The m-bean browser web page 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
This takes you to the m-bean properties web page. An example of its content is shown in Figure 8-2.
The Value field for a read-write property is a different color from the web page background. The Value field for a read-only property is the same color as the web page background. The Value field for a property that is an array contains a link to a page that displays the individual elements in the array.
If a reload period has been specified, it is reset to 0 when you click Apply.
If you specify the reload period, the m-bean properties web page is automatically reloaded each time the reload period elapses. This updates the page with the new values of any properties that have changed since the page was last reloaded. To specify the reload period, in the Reload Period text-entry field, type the number of seconds you want between each reload and click Reload. The minimum reload period is 5 seconds. To disable reloading, specify a reload period of 0 seconds. Clicking Reload also causes the page to be updated immediately.
In the Actions area of the m-bean properties web page:
This takes you to the Agent Administration page. Its content is shown in Figure 8-3.
For more information, refer to Information for Instantiating an M-Bean.
Instantiate to instantiate the m-bean
Instantiate in DB to instantiate the m-bean in persistent storage (available only if the agent supports persistent m-beans)
Delete to delete the m-bean
A message is added to the bottom of this page indicating whether the request was processed. To confirm that the m-bean has been instantiated or deleted, follow the List of M-Beans link.
In the m-bean properties web page, click Delete. The m-bean properties web page is shown in Figure 8-2.
![]() | ![]() | ![]() |
Tools Provided | ![]() | The job Tool |