protected Bean register(String name, Class clazz)
{
try
{
ObjectName objectName = ObjectName.getInstance(name);
ModelMBeanInfo info = new ExoMBeanInfoBuilder(clazz).build();
RequiredModelMBean mbean = new RequiredModelMBean(info);
mbean.setManagedResource(clazz.newInstance(), "ObjectReference");
server.registerMBean(mbean, objectName);
return new Bean(objectName, (ModelMBeanInfo)server.getMBeanInfo(objectName));
}