Java Reference
In-Depth Information
The VERSION attribute
The VERSION attribute specifies a version number for the MBean and JAR files to
be loaded into the agent. The value of this attribute must be a dot-separated list
of decimal numbers (for example, 1.4 ).
The ARGLIST tag
This tag lets you specify a particular constructor for the M-let service to use
when instantiating the MBean described by this MLET tag. However, the use of
this tag is restricted to describing constructors with arguments that can be repre-
sented as String values. In the ARGLIST attribute, you use an additional attribute
to specify type-value pairs describing arguments to a constructor. The following
is an example:
<ARGLIST>
<ARG TYPE=java.lang.Integer VALUE=5 >
</ARGLIST>
The M-let service will parse an argument list to build a constructor signature. It will
look for a constructor with a matching signature to use to instantiate the MBean.
MLET tag rules
After being introduced to the possible attributes to an MLET tag entry, you should
recognize that each MLET entry must contain at least two attributes: it must con-
tain a CODE or OBJECT attribute, and an ARCHIVE attribute. In addition, remember
that each M-let file can contain as many MLET entries as you wish—there is no
upper limit. Table 10.1 summarizes the attributes.
Table 10.1
A summary of the available MLET tag attributes
MLET tag attribute
Required
Description
Yes
Required unless OBJECT is used; specifies the class of the MBean
CODE
OBJECT
Yes
Required unless CODE is used; specifies a serialized object
Yes
Specifies JAR files containing the MBean classes and resources
ARCHIVE
No
Used if the ARCHIVE JAR files are not in the same directory as the
M-let file
CODEBASE
No
Object name value for the new MBean
NAME
No
Specifies a version number for the MBean and JAR files
VERSION
Using table 10.1, you can quickly recall the mandatory attributes and their pur-
pose. Now that we have covered how to create M-let files, let's examine the MLet
Search WWH ::




Custom Search