private static void clearContainer() {
    try {

      for (int i = 0; i < thProcess.getPbe().getContainer_threadevents().size(); i++) {
        schedulingThreadEvent ste =
            (schedulingThreadEvent) thProcess.getPbe().getContainer_threadevents().get(i);
        if (ste.getStateThread() == 0) {
          ste.setThreadDone(true);
          ste.setStateThread(2);
        }
        ste.interrupt();
      }

    } catch (Exception e) {

    }
  }
  public static void reStart() {
    try {
      configuration = new batch_init();
      clearContainer();

      if (thProcess != null) {
        thProcess.interrupt();
        thProcess = null;
      }

      thProcess = new schedulingThreadProcess();
      thProcess.start();
      new bsException("Scheduler: Start schedulingThreadProcess", iStub.log_INFO);
    } catch (Exception e) {
      e.toString();
    }
  }
  public static void reScan() {
    try {
      configuration = new batch_init();
      clearContainer();

      thProcess = new schedulingThreadProcess();
      thProcess.start();
      new bsException("Scheduler: Start schedulingThreadProcess");
    } catch (Exception e) {
      e.toString();
    }
  }
  public void init(ServletConfig config) throws ServletException {

    configuration = new batch_init();

    try {
      if (configuration.get_active().toLowerCase().trim().equals("true")) {
        thProcess = new schedulingThreadProcess();
        thProcess.start();
        new bsException("Scheduler:Start schedulingThreadProcess");
      }
    } catch (Exception e) {
    }
  }