jmx를 사용하여 원격 메서드(mbean method)를 호출(invoke)하는 예제

By | 2월 5, 2016

 

JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://0.0.0.0:9001/jmxrmi");
JMXConnector jmxc = JMXConectorFactory.connect(url, null);
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
ObjectName gatewayObjName = new ObjectName("org.bruce.test:name=TestServiceManaged")
mbsc.invoke(gatewayObjName, "testRemoteMethod", null, null);

 

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments