Expose a JMX Server so that Oddjob jobs can interact with it.

Features of this service include:

MBeans are identified as part of Oddjob's property expansion syntax using their full Object Names. If this service is given the id 'my-jmx-world' an MBean in the domain 'mydomain' and name 'type=greeting,name=hello' would be identified from another Oddjob job with the expression:
Note that what is being referenced here is an Oddjob wrapper around the MBean that allows operations and attributes of the MBean to accessed elsewhere. What is referenced is not an MBean instance.

The example below shows an MBean (wrapper) being passed as the source property to an invoke.

Attributes of the MBean can be accessed as if they were properties of the MBean. If the MBean above has an attribute 'FullText' its value can be accessed using the expression:

If an MBean Object Name contains dots (.) it must be quoted using double quotes. If the domain in the above example was my.super.domain the MBean can be identified with the expression:
and the attribute with:
Note that this support for quoting does not apply to Oddjob property expansion expressions in general - only too these MBean identifiers.

Property Summary

connection The JMX service URL.
environment The environment.
heartbeat The heart beat interval, in milliseconds.
name A name, can be any text.

Example Summary

Example 1 This example demonstrates reading an attribute, setting an attribute and invoking an operation.

Property Detail


Configured ByATTRIBUTE
RequiredNo. If not provided the client connects to the Platform MBean Server for the current VM.

The JMX service URL. This is can be either the full blown convoluted JMX Service URL starting service.jmx.... or it can just be the last part of the form hostname[:port][/instance-name].


Configured ByELEMENT

The environment. Typically username/password credentials.


Configured ByATTRIBUTE
RequiredNot, defaults to 5 seconds.

The heart beat interval, in milliseconds.


Configured ByATTRIBUTE

A name, can be any text.


Example 1

This example demonstrates reading an attribute, setting an attribute and invoking an operation.

        <sequential id="sequential">
                <jmx:service id="jmx-service" connection="localhost:13013" xmlns:jmx="http://rgordon.co.uk/oddjob/jmx"/>
                <echo id="echo-farm">${jmx-service/"fruit:service=vendor,name=Pickles".Farm}</echo>
                        <value key="jmx-service/fruit:service=vendor,name=Pickles.Rating" value="4.2"/>
                <invoke id="invoke-quote" function="quote">
                        <value value="apples"/>
                        <value value="2012-08-06"/>
                        <value value="42"/>
                        <value value="${jmx-service/fruit:service=vendor,name=Pickles}"/>

(c) Rob Gordon 2005 - 2017