use of org.opennms.netmgt.dao.jmx.JmxConfigDaoJaxb in project opennms by OpenNMS.
the class JMXCollectorTest method setUp.
@Before
public void setUp() throws Exception {
System.setProperty("opennms.home", new File("src/test/resources").getAbsolutePath());
jmxDataCollectionConfigDao = new JMXDataCollectionConfigDao();
jmxNodeInfo = new JMXNodeInfo(0);
jmxCollector = new JMXCollectorImpl();
jmxCollector.setJmxConfigDao(new JmxConfigDaoJaxb());
jmxCollector.setJmxDataCollectionConfigDao(jmxDataCollectionConfigDao);
platformMBeanServer = ManagementFactory.getPlatformMBeanServer();
ObjectName objectName = new ObjectName("org.opennms.netmgt.collectd.jmxhelper:type=JmxTest");
JmxTestMBean testMBean = new JmxTest();
platformMBeanServer.registerMBean(testMBean, objectName);
collectionAgent = new MockCollectionAgent(1, "node", "fs", "fid", InetAddress.getLoopbackAddress());
}
Aggregations