The commons-modeler package includes a set of custom tasks
for the Ant build tool, which
lets you use Ant to automate the loading of MBean descriptor information,
dynamic creation of JMX MBeans, and calling operations and attribute setters
on those MBeans. If your application can assemble itself based JMX Mbean
operations, this means that you can now use Ant scripts to manage the lifecycle
of your application's components, without having to write Java code for this
purpose.
To use these tasks, you must copy commons-modeler.jar into
the lib subdirectory of your Ant installation, or make sure that
it is on the CLASSPATH being used to execute Ant.
Locates the JMX MBean identified by the objectName attribute,
and calls its setAttribute() operation, passing in the attribute
name specified by attribute and the value specified by
value, after converting the value to the type specified by
type.
Parameters
Attribute
Description
Required
attribute
Name of the attribute for which the
setAttribute() method will be called.
Yes
objectName
The JMX ObjectName that identifies the MBean whose
setAttribute() method will be called.
Yes
type
The data type of the attribute value to be set. If not specified,
will be assumed to be a String. Otherwise, must be one of
ObjectName, boolean, or int.
No
value
String representation of the value to which this attribute will be
set. Either value or valueRef must be
specified.
No
valueRef
Indirect pointer to a project reference containing the value to which
this attribute will be set. Either value or
valueRef must be specified.
The commons-modeler package includes a set of custom tasks for the Ant build tool, which lets you use Ant to automate the loading of MBean descriptor information, dynamic creation of JMX MBeans, and calling operations and attribute setters on those MBeans. If your application can assemble itself based JMX Mbean operations, this means that you can now use Ant scripts to manage the lifecycle of your application's components, without having to write Java code for this purpose.
To use these tasks, you must copy
commons-modeler.jarinto thelibsubdirectory of your Ant installation, or make sure that it is on the CLASSPATH being used to execute Ant.mbean / MLET
jmx-attribute
Description
Locates the JMX MBean identified by the
objectNameattribute, and calls itssetAttribute()operation, passing in the attribute name specified byattributeand the value specified byvalue, after converting the value to the type specified bytype.Parameters
Name of the attribute for which the
setAttribute()method will be called.setAttribute()method will be called.The data type of the attribute value to be set. If not specified, will be assumed to be a
String. Otherwise, must be one ofObjectName,boolean, orint.String representation of the value to which this attribute will be set. Either
valueorvalueRefmust be specified.Indirect pointer to a project reference containing the value to which this attribute will be set. Either
valueorvalueRefmust be specified.jmx-operation
mbeans-descriptors