public ObjectName preRegister(MBeanServer server,ObjectName name) throws Exception {
  if (name == null) {
    if (config == null)     return null;
    if (config.getName() == null)     return null;
    name=ScanManager.makeMBeanName(ScanDirConfigMXBean.class,config.getName());
  }
  objectName=name;
  mbeanServer=server;
synchronized (this) {
    configname=name.getKeyProperty("name");
    if (config == null)     config=new ScanManagerConfig(configname);
 else     config=config.copy(configname);
  }
  return name;
}

public ObjectName preRegister ( MBeanServer server , ObjectName name ) throws Exception { if ( name == null ) { if ( config == null ) return null ; if ( config . getName ( ) == null ) return null ; name = ScanManager . makeMBeanName ( ScanDirConfigMXBean . class , config . getName ( ) ) ; } objectName = name ; mbeanServer = server ; synchronized ( this ) { configname = name . getKeyProperty ( "name" ) ; if ( config == null ) config = new ScanManagerConfig ( configname ) ; else config = config . copy ( configname ) ; } return name ; }
allows the mbean to perform any operations it needs before being registered in the mbean server . if the name of the mbean is not specified , the mbean can provide a name for its registration . if any exception is raised , the mbean will not be registered in the mbean server .
