jmx4r 0.0.5 has just been released (jmx4r is a JRuby library which makes it super easy to write simple Ruby scripts to manage Java applications using JMX).
There is only one enhancement to this release but it is an important one: you can now specify a custom JMX URL to connect to a MBean Server.
Before this release, the URL was hard-wired to connect using the JMX URL defined by Sun
This means it was not possible to use jmx4r to connect to a MBean server which used another URL or another connector that RMI/JRMP.
With this release, you can now fully specify the url:
url = "service:jmx:rmi:///jndi/iiop://node1:7001/weblogic.management.mbeanservers.runtime" JMX::MBean.establish_connection :url => url
As an example, the code above can be used to connect to a Weblogic server using RMI/IIOP.
:url argument is used,
:port arguments are ignored. If you're connecting to a Sun JRE, it is still simpler to specify only
This enhancement was proposed by Tim Koopmans. Thanks Tim!
As usual, to get this new release, just update the rubygem:
jruby -S gem install jmx4r