Jeff Mesnil’s Weblog

Archive for March, 2007

JMX Scripts using JRuby

Friday, March 23rd, 2007

[update: fixed Ruby script by using ManagementFactory::newPlatformMXBeanProxy instead of MBeanServerInvocationHandler::newProxyInstance based on Daniel comment]

I needed to write a script to automate the management of a Java application using JMX which I could put in a crontab.

I found some explanation on how to script JMX in jconsole with BeanShell or with Groovy. It’s a good approach […]