Drawing Hands by M.C. Escher (1948)

Jeff Mesnil

Archive for June 11th, 2007


jmx4r, a JMX Libary for JRuby

On June 11th, 2007 in java, jmx, jmx4r, jruby, ruby (2 Comments »)

Just in time for the release of JRuby 1.0 and following my experiments with writing JRuby scripts to manage remote applications using JMX (part I & II), I created jmx4r, a simple library which makes it super easy to write such scripts.

For example, to trigger a Garbage Collection on a remote Java application , the whole script is:

require 'java'
require 'jmx4r'

memory = JMX::MBean.find_by_name "java.lang:type=Memory"
memory.verbose = true
memory.gc

Simple enough, isn’t it?

(more…)