Dev/jmx

To connect to a running Firbase via JMX from another Java process you need to do the following.

Include firebase-jmx artifact.

com.cubeia.firebase firebase-jmx 1.9.4-CE provided

Then create a connection to the remote Firebase JMX Server

JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://127.0.0.1:8999/jmxrmi"); JMXConnector jmxc = JMXConnectorFactory.connect(url, null); MBeanServerConnection mbsc = jmxc.getMBeanServerConnection;

Then you can create proxy mBeans that you can invoke methods on directly. Remember that all methods call are done remotely so they may take time to execute and can fail mid-call. Below is an example of getting the StateClientRegistryMBean proxy. ObjectName clientRegistryName = new ObjectName("com.cubeia.firebase.clients:type=ClientRegistry"); StateClientRegistryMBean clientRegistry = JMX.newMBeanProxy(mbsc, clientRegistryName, StateClientRegistryMBean.class, true);

You can read more about what mBeans and methods are exposed in the Firebase JMX Documentation found here: http://cubeia.org/index.php/firebase/documentation