Bug 534283 - (RHQ-1094) provide a new optional plugin config to the JMX plugin to specify additional EMS classpath entries
provide a new optional plugin config to the JMX plugin to specify additional ...
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
All All
high Severity medium (vote)
: ---
: ---
Assigned To: John Mazzitelli
Jeff Weiss
: Improvement
Depends On:
Blocks: RHQ-1093
  Show dependency treegraph
Reported: 2008-11-09 14:32 EST by John Mazzitelli
Modified: 2014-11-09 17:48 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.2
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2008-11-09 14:32:00 EST
In order to support allowing JMX plugin to connect and monitor arbitrary JVMs/resources, we need to be able to tell the EMS connection to add additional classpath entries.

For example, in order to connect and monitor Hibernate statistics, we need the tell EMS to not only connect to the hibernate JVM, we must also tell it where it can find the hibernate classes that will be returned by the hibernate statistics MBean (like the query stats object).

Suggest we add a new plugin config option in which you can specify one or more jars and/or directories containing jars.  The EMS connection will then be given the names of all the jars found (ie. they will be added to the EMS connections classpath entries).
Comment 1 John Mazzitelli 2008-11-09 15:11:46 EST
I'll add this to the JMX Server resource type's plugin configuration:

   description="Comma-separated list of directories and filenames that contain resources and classes needed to communicate with the JMX Server and its MBeans. If you specify 'some/directory/*.jar', all jars found in the given directory will be added."/>

EMS provides the ability to add class path entries of either directories or .jar filenames. Here, we allow you to specify 0, 1 or more .jar filenames, directory names (for location of resources like .xml or .properties files needed by the connection) or directory/*.jar (as the description indicates, this is where you can convienently add all jar files found in 'directory').
Comment 2 John Mazzitelli 2008-11-09 23:48:39 EST
Verified this worked.  I was able to auto-discovery a running, standlone J2SE app with hibernate running inside it. I used this new plugin config setting to tell EMS where it can find the hibernate jars and was able to successfully execute hibernate plugin operations and collect hibernate stats.
Comment 3 John Mazzitelli 2009-02-18 11:05:03 EST
All you need to test this is to look at or create any JMX Server resource (you can do a manual create if you'd like). Go to that server resource's inventory tab and confirm you see the new "additionalClassPathEntries" plugin configuration setting.

Optionally, to test this actually actually works you can do the stuff this demo did: http://management-platform.blogspot.com/2008/11/monitoring-hibernate.html
Comment 4 Jeff Weiss 2009-02-18 15:01:08 EST
I used mazz's helloworld.jar (see rhq-1600 )  to test these hibernate entities, all worked as expected.  Could see the inventory items, metrics, etc.  rev3078
Comment 5 Red Hat Bugzilla 2009-11-10 15:23:49 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1094
This bug incorporates RHQ-1001

Note You need to log in before you can comment on or make changes to this bug.