MulticastDetector detector = new MulticastDetector();
server.registerMBean(detector, new ObjectName("jmx.remoting:type=Detector,transport=multicast"));
detector.start();
System.err.println("Starting MulticastDetector");
CascadingAgent agent = new CascadingAgent();
server.registerMBean(agent, new ObjectName("jmx.remoting:type=CascadingAgent"));
agent.start();
System.err.println("Starting CascadingAgent");
ObjectInstance html = server.createMBean("com.sun.jdmk.comm.HtmlAdaptorServer",
null);
server.invoke(html.getObjectName(), "setPort",