}
// assemble MBean info (from annotations by default)
ModelMBean modelMBean = new RequiredModelMBean();
modelMBean.setManagedResource(mbean, MR_TYPE_OBJECT_REFERENCE);
MBeanInfoAssembler mBeanInfoAssembler = new MetadataMBeanInfoAssembler(new AnnotationJmxAttributeSource());
modelMBean.setModelMBeanInfo(mBeanInfoAssembler.getMBeanInfo(mbean, objectName.getCanonicalName()));
registrar.doRegister(modelMBean, objectName);
}
catch (Exception e) {
throw new JmxRegisterException("error registering MBean", e);
}