TestClass test2 = new TestClass("t1", new URL("http://www.sourceforge.net/projects/mx4j"));
server.registerMBean(test1, new ObjectName("Test:name=test1"));
server.registerMBean(test2, new ObjectName("Test:name=test2"));
// add a stats MBean
TimedStatisticsRecorder recoder = new TimedStatisticsRecorder();
recoder.setObservedObject(new ObjectName("Test:name=test1"));
recoder.setObservedAttribute("Double");
server.registerMBean(recoder, new ObjectName("Test:name=test1recorder"));
server.invoke(new ObjectName("Test:name=test1recorder"), "start", null, null);
// add a couple of MBeans