A Groovy Adapter for JMX
Java Groovy
Latest commit d59011f Feb 20, 2012 @nickman Started implementation of HEAD requests to reduce traffic on class
change verifiers (e.g. JBoss deployers) and to provide a low traffic
ping point to allow remotable MBeanServer to verify the RCL is still
Failed to load latest commit information.
gmx Started implementation of HEAD requests to reduce traffic on class Feb 20, 2012
README.md Update README.md Jan 7, 2012


GroovyMX - A Helios Project

GroovyMX (or just gmx) is a Groovy wrapper for JMX Clients. Taking a page from Groovy's SQL support, the idea is to reduce the amount of code to write something useful against a JMX MBeanServer.

Here's a quick example. The following script connects to a remote MBeanServer and prints the committed number of bytes in each Memory Pool.

import org.helios.gmx.*;
gmx = Gmx.remote("service:jmx:rmi://testserver1:8002/jndi/rmi://testserver1:8003/jmxrmi");
gmx.mbeans("java.lang:type=MemoryPool,name=*", {
    println "${it.objectName}:\t${it.Usage.committed}";

The output of the script is:

java.lang:type=MemoryPool,name=PS Eden Space:  402653184
java.lang:type=MemoryPool,name=PS Survivor Space:   16777216
java.lang:type=MemoryPool,name=Code Cache:  3407872
java.lang:type=MemoryPool,name=PS Perm Gen: 84738048
java.lang:type=MemoryPool,name=PS Old Gen:  268435456
  • Requirements
  • Architecture
  • Dependencies
  • Gmx
    • Local
    • Remote
    • Attach
  • MetaMBeans
  • Registering Listeners
  • Remote Gmx Agent
    • Upgrading Remote MBeanServerConnections to MBeanServers
    • Agents
    • Remote Installs
      • RMI
      • SSH
    • Reverse Class Loading
    • Chanined Installs (Propagating Agents)
  • MBean Cross Registration
  • See groovy-remote for closure remoting.