JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + _jmxUrl + "/jmxrmi");
JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
_mbeanServer = jmxc.getMBeanServerConnection();
MBeanServerNotificationFilter filter = new MBeanServerNotificationFilter();
filter.enableAllObjectNames();
_mbeanServer.addNotificationListener(MBeanServerDelegate.DELEGATE_NAME, this, filter, null);
init();
_timer = new Timer(true);
_timer.scheduleAtFixedRate(new SampleTask(), _samplePeriod, _samplePeriod);
}