6.1

Table Of Contents
The plug-in must also define the control implementation class, which resides in the hq-jmx.jar file.
<plugin type="control"
class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
The control actions are invoked as MBean operations by the plug-in, as follows
ObjectName name = new ObjectName("Catalina:type=StringCache");
return MbeanServer.invoke(name, "reset", new Object[0], new String[0]);
which maps to the following MBean operation
public interface StringCacheMBean {
public void reset();
}
Example: WebApp Cache Control Actions
The WebApp Cache plug-in example provides the following control actions:
<actions include="unload,lookup,allocate"/>
which maps to the following MBean operations:
public interface WebAppCacheMBean {
public boolean unload(String name);
public CacheEntry lookup(String name);
public boolean allocate(int value);
}
Defining the Server Auto-Inventory Element
To implement auto-discovery at the server level, you must invoke an autoinventory plug-in with the
MxServerDetectorclass within the server tag.
Implement auto-discovery as follows,
<server name="Java Server Name" version ="version #">
...
<plugin type="autoinventory" class="org.hyperic.hq.product.jmx.MxServerDetector"/>
...
</server>
In the case of service, auto-discovery is supported for custom MBean services, driven by the OBJECT_NAME
property. To implement auto-discovery at the service level, invoke the autoinventory plug-in, leaving out
the class attribute, within a service tag.
<service name="Java Service Name">
...
<plugin type="autoinventory"/>
...
</service>
The JMX plug-in uses the MBeanServer.queryNames method to discover a service for each MBean instance. In
the case in which the OBJECT_NAME contains configuration properties, the properties are auto-configured.
Endpoint Operations Management Agent Plug-in Development Kit
24 VMware, Inc.