try
{
MBeanServer server = MBeanServerFactory.createMBeanServer();
ObjectName oname = new ObjectName("test:name=test");
server.registerMBean(new Trivial(), oname);
TrivialMBean mbean = (TrivialMBean)MBeanProxy.get(
TrivialMBean.class, oname, MBeanServerLocator.getId(server));
}
catch (Throwable t)