Skip to content
This repository

A Groovy Adapter for JMX

branch: master

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
latest commit d59011fcf5
Nicholas Whitehead authored February 20, 2012
Octocat-spinner-32 content Adding javadoc snapshot to repo for links. January 05, 2012
Octocat-spinner-32 gmx Started implementation of HEAD requests to reduce traffic on class February 20, 2012
Octocat-spinner-32 Update January 07, 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.

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.
Something went wrong with that request. Please try again.