try {
final JMXServiceURL url = new JMXServiceURL(path);
final JMXConnector jmxc = JMXConnectorFactory.connect(url);
try {
final MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
final SupervisorMBean bean = JMX.newMBeanProxy(mbsc, new ObjectName(Supervisor.NAME), SupervisorMBean.class);
configuration = bean.configuration().toString();
} finally {
jmxc.close();
}
} catch (IOException e) {
error(Errors.format(Errors.Keys.CanNotConnectTo_1, path), e);