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.
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.