public boolean onScheduleAsLibrary(Config config,Config runtime,IScheduler scheduler,PackingPlan packing){
  boolean ret=false;
  try {
    scheduler.initialize(config,runtime);
    ret=scheduler.onSchedule(packing);
    if (ret) {
      ret=SchedulerUtils.setLibSchedulerLocation(runtime,scheduler,false);
    }
 else {
      LOG.severe("Failed to invoke IScheduler as library");
    }
  }
  finally {
    scheduler.close();
  }
  return ret;
}

public boolean onScheduleAsLibrary ( Config config , Config runtime , IScheduler scheduler , PackingPlan packing ) { boolean ret = false ; try { scheduler . initialize ( config , runtime ) ; ret = scheduler . onSchedule ( packing ) ; if ( ret ) { ret = SchedulerUtils . setLibSchedulerLocation ( runtime , scheduler , false ) ; } else { LOG . severe ( "Failed to invoke IScheduler as library" ) ; } } finally { scheduler . close ( ) ; } return ret ; }
invoke the onscheduler ( ) in ischeduler directly as a library
