Connect to MBeanServer
A running MBean Server is needed in your application. It is the central registry for all MBeans of your application. Fortunately, since JMX 1.2 there is a standardized factory for finding running servers and starting new ones. HiveMind first tries to find a running server. That could be provided by an application server or servlet engine (like Tomcat 5) or your J2SE 1.5 runtime environment. Add these lines to your module descriptor:
<contribution configuration-id="hivemind.EagerLoad"> <load service-id="hivemind.management.MBeanRegistry"/> </contribution>
Connecting to a running server results in a unified management of infrastructure mbeans and your applications mbeans. Infrastructure mbeans are for example the J2SE 1.5 MBeans for instrumentation of the JMX (GarbageCollector, MemoryManager etc.). If no running server is found, a new one is started.