### JMX

code

docs

tests

The JMX library provides a service that exposes a Zest™ app in JMX automatically, giving you an opportunity to inspect the app much as you would with the Envisage Tool tool.

Table 35. Artifact

Group ID | Artifact ID | Version
--- | --- | ---
org.qi4j.library | org.qi4j.library.jmx | 2.1

#### Usage

    public void assemble( ModuleAssembly module )
            throws AssemblyException
    {
    [...snip...]

        new JMXAssembler().assemble( module );

        module.services( JMXConnectorService.class ).instantiateOnStartup();
        module.entities( JMXConnectorConfiguration.class );
        module.forMixin( JMXConnectorConfiguration.class ).declareDefaults().port().set( 1099 );
    }

Note that you need to run it with -Dcom.sun.management.jmxremote so that the JVM starts the MBeanServer.