Beans Exposed with JMX Builder
One concept to come out of Groovy is the notion of builders. Builders can be described as a consistent and concise syntax for building a tree of objects. They are used for DOM-like API's, Ant tasks, Swing GUI's and more. Earlier in 2008 Vladimir Vivien decided to create a builder for the JMX API which works with Groovy 1.5 and Java 5 or newer.
The current version boasts the following features:
- Domain Specific Language (DSL) for JMX API using Builder pattern
- Simplified JMX API's programmability
- Maintain the natural Groovy syntax
- Declaratively expose Java/Groovy objects as JMX managed MBeans
- Support class-embedded or explicit descriptors
- Inherent support for JMX's event model
- Seamlessly create JMX event broadcasters
- Attach event listeners as inline closures
- Use Groovy's dynamic nature to easily react to JMX events notifications
- Provides a flexible registration policy for MBean
- No special interfaces or class path restrictions
- Shields developer from complexity of JMX API
- Exposes attribute, constructors, operations, parameters, and notifications
- Simplifies the creation of connector servers and connector clients
- Support for exporting JMX timers
JmxBuilder is still relatively new and is currently at version 0.5. Vladamir anticipates releasing a 1.0 version later in 2009 after adding features such as the ability to query beans, Spring JMX Annotations and monitoring support.
One thing Vladamir pointed out is Groovy already has the GroovyMBean which allows you to query and interact with MBeans today.
JmxBuilder included in Groovy 1.6-RC-1
Great job, Vladimir!
Tyler Akidau Jan 24, 2015