Starting with the Java 5 programming language, it has gotten easier to incorporate monitoring and manageability into any application running on a standard VM. Developers now have access to a wealth of runtime profiling information exposed through Java Management Extensions (JMX), including memory consumption, garbage collection, and thread activities (and JSR77-compliant app servers expose standard enterprise management components). Using JMX API and the scripting power of Groovy, developer can easily inject runtime management and control capabilities into their own applications. This presentation is about JMX and Groovy. It shows how easy it is to insert runtime manageability into your application when you combine the JMX API with the flexibility of the Groovy scripting language. The Java Management Extension (JMX) provides the infrastructural layer for runtime management while Groovy provides the syntactical substrate in which you can readily express class instrumentation for management. The presentation takes an exploratory look at how Groovy can help script the different JMX constituencies including interacting with the MBean Server, exposing MBeans, using the Server Connector API, and sending JMX events to registered listeners. The presentation includes several examples including applications that can react to JMX events. Of course, wherever there's Groovy, there must be Grails. You will see a practical application of management scripting applied to a demo Grails application. Presentation Materials |