Jolokia is a small utility which provides a JSON-based JMX connector over HTTP. WildFly Swarm supports a simple method for adding Jolokia to your application.

Adding Jolokia

To bring Jolokia to your application, you need to add a dependency on the Jolokia fraction:


This is sufficient to bind an unsecured Jolokia to the context root of /jolokia.

If you would like to configure where Jolokia is mounted, you can override the defaults within your main(…​) method:

Container container = new Container();
    new JolokiaFraction("/jmx")

The above would make Jolokia available at the path of /jmx.

Adding the Jolokia fraction to your application will bring in the Undertow fraction implicitly if you have not already included it.