> 2) Ability to attach to a local JVM's MBean server without
the need for a JMX remoting. We have written a new Generic JMX plugin that makes use of
the Java Attach API to enable the RHQ agent to discover JVMs that are not exposed via JMX
remoting. These JVMs must be running under the same OS user account as the agent. This
is critical to large enterprise operations that do not want to manage hundreds or
thousands of JVM JMX ports and all the security implications that entails. This will also
allow us to use JON/RHQ to manage our vast array of Stand Alone Java process. I have code
I would like to submit that demonstrates this. The idea is that it should, most likely,
be rolled into the standard Generic JMX plugin
This may already be doable:
/*
* We'll connect to the discovered VM on the local host, so set the
jmx connection
* properties accordingly. This may only work on JDK6+, but then JDK5 is
deprecated
* anyway.
*/
pluginConfiguration.put(new
PropertySimple(JMXDiscoveryComponent.COMMAND_LINE_CONFIG_PROPERTY,
javaClazz));
pluginConfiguration.put(new
PropertySimple(JMXDiscoveryComponent.CONNECTION_TYPE,
LocalVMTypeDescriptor.class.getName()));
This is how I do it in the (currently very basic) hadoop plugin (see
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=blob_plain;f=modules/plu...
)
I thought the LocalVMTypeDescriptor conn type was for when the managed
JMX server was inside the same process as the RHQ plugin container, at
least that seems to be what the code in
InternalJMXServerDiscoveryComponent suggests.