1 8 package mx4j.examples.mbeans.iiop; 9 10 import javax.management.MBeanServer ; 11 import javax.management.MBeanServerFactory ; 12 import javax.management.MBeanServerInvocationHandler ; 13 import javax.management.ObjectName ; 14 15 26 public class IIOPServer 27 { 28 public static void main(String [] args) throws Exception 29 { 30 MBeanServer server = MBeanServerFactory.newMBeanServer(); 31 32 ObjectName name = new ObjectName ("examples:type=iiop-remote"); 33 HelloImpl remote = new HelloImpl(); 34 server.registerMBean(remote, name); 35 36 HelloImplMBean managed = (HelloImplMBean)MBeanServerInvocationHandler.newProxyInstance(server, name, HelloImplMBean.class, false); 37 managed.start(); 38 } 39 } 40 | Popular Tags |