3 Replies Latest reply on Apr 24, 2009 4:11 AM by Greg Hinkle

    Set additional classpath for my own MBeanResourceComponent

    Jim Ma Apprentice

      I wrote a rhq plugin to monitor my application deployed in jbossAS server through JMX. In the plugin configuration file , I have something like this :

       <depends plugin="JMX" />
       <depends plugin="Tomcat" />
       <depends plugin="JBossAS" useClasses="true"/>
       <service name="ESB"
       description="Hello World rhq plugin"
       <parent-resource-type name="JBossAS Server" plugin="JBossAS"/>

      The HelloWorldDiscoveryComponent extends MBeanResourceDiscoveryComponent and HelloWorldComponent extends MBeanResouceComponent . In HelloWorldComonent , I would like to monitor a field defined in my own class foo.MyValue . The MyValue object can be retrieved through JMX method getValue() :
      MyValue getValue() {
       return value;

      I added the foo.MyValue to the lib directory in my plugin . But the EmsConnection from pararentResouceComponent can not load that class.
      I saw there is "additionalClassPathEntries" configuration for JMXServerDisocveryComponent . How can I do the same thing for my plugin ? How can I add the classes under plugin lib directory to the EmsConnection settings ?

      Thanks in advance .