@Override public void disconnectSensors() { super.disconnectSensors(); disconnectServiceUpIsRunning(); if (jmxFeed != null) jmxFeed.stop(); if (jmxHelper !=null) jmxHelper.terminate(); }
@Override protected void postStop() { super.postStop(); JmxHelper helper = getHelper(); Boolean ownHelper = getConfig(OWN_HELPER); if (helper != null && ownHelper) helper.terminate(); }
@Override public void waitForServiceUp(long duration, TimeUnit units) { super.waitForServiceUp(duration, units); if (((JavaSoftwareProcessDriver)getDriver()).isJmxEnabled()) { // Wait for the MBean to exist JmxHelper helper = new JmxHelper(this); try { helper.assertMBeanExistsEventually(ZOOKEEPER_MBEAN, units.toMillis(duration)); } finally { helper.terminate(); } } }
@Override public void waitForServiceUp(long duration, TimeUnit units) { super.waitForServiceUp(duration, units); if (((KafkaBrokerDriver)getDriver()).isJmxEnabled()) { // Wait for the MBean to exist JmxHelper helper = new JmxHelper(this); try { helper.assertMBeanExistsEventually(SOCKET_SERVER_STATS_MBEAN, units.toMillis(duration)); } finally { helper.terminate(); } } }
@Override public void waitForServiceUp(long duration, TimeUnit units) { super.waitForServiceUp(duration, units); // Also wait for the MBean to exist (as used when creating queue/topic) JmxHelper helper = new JmxHelper(this); try { String virtualHost = getConfig(QpidBroker.VIRTUAL_HOST_NAME); ObjectName virtualHostManager = new ObjectName(format("org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=\"%s\"", virtualHost)); helper.connect(); helper.assertMBeanExistsEventually(virtualHostManager, units.toMillis(duration)); } catch (MalformedObjectNameException e) { throw Exceptions.propagate(e); } catch (IOException e) { throw Exceptions.propagate(e); } finally { if (helper != null) helper.terminate(); } }