public static void register ( final MBeanServer mbs , final Object obj ) { final ObjectName mBeanName = JmxUtils . getObjectName ( obj . getClass ( ) ) ; try { mbs . registerMBean ( obj , mBeanName ) ; } catch ( final InstanceAlreadyExistsException e ) { LOG . error ( "Could not start JMX" , e ) ; } catch ( final MBeanRegistrationException e ) { LOG . error ( "Could not register" , e ) ; } catch ( final NotCompliantMBeanException e ) { LOG . error ( "MBean error" , e ) ; } }
Registers the specified object as an MBean with the specified server using standard conventions for the bean name .