protected boolean registerMBean(final String objectName){
  MBeanServer mbs=ManagementFactory.getPlatformMBeanServer();
  try {
    mxbeanName=new ObjectName(objectName);
    mbs.registerMBean(this,mxbeanName);
  }
 catch (  MalformedObjectNameException e1) {
    e1.printStackTrace();
    return false;
  }
catch (  NullPointerException e1) {
    e1.printStackTrace();
    return false;
  }
catch (  InstanceAlreadyExistsException e) {
    e.printStackTrace();
    return false;
  }
catch (  MBeanRegistrationException e) {
    e.printStackTrace();
    return false;
  }
catch (  NotCompliantMBeanException e) {
    e.printStackTrace();
    return false;
  }
  return true;
}

protected boolean registerMBean ( final String objectName ) { MBeanServer mbs = ManagementFactory . getPlatformMBeanServer ( ) ; try { mxbeanName = new ObjectName ( objectName ) ; mbs . registerMBean ( this , mxbeanName ) ; } catch ( MalformedObjectNameException e1 ) { e1 . printStackTrace ( ) ; return false ; } catch ( NullPointerException e1 ) { e1 . printStackTrace ( ) ; return false ; } catch ( InstanceAlreadyExistsException e ) { e . printStackTrace ( ) ; return false ; } catch ( MBeanRegistrationException e ) { e . printStackTrace ( ) ; return false ; } catch ( NotCompliantMBeanException e ) { e . printStackTrace ( ) ; return false ; } return true ; }
registers a new mbean with the platform ' s mbean server after which this mbean will be visible in jmx .
