public void run() {

    System.out.println("System has entered running mode");

    while (threadCheck) {

      System.out.println("O.K. see how we execute target program");

      this.generatePdf();

      try {

        System.out.println("Right, let's wait for task to complete of fail");

        java.lang.Thread.currentThread().sleep(200);

        System.out.println("It's time for us threads to get back to work after the nap");

      } catch (java.lang.InterruptedException IntExec) {

        System.out.println(IntExec.getMessage());
      }

      threadCheck = false;

      System.out.println("We shall be lucky to get back to start in one piece");
    }

    if (!threadCheck) {

      Thread.currentThread().stop();
    }
  }
  public void MOH204BOPOver5RegisterPdf(
      java.sql.Connection connDb, java.util.Date startDate, java.util.Date lastDate) {

    dbObject = new com.afrisoftech.lib.DBObject();

    connectDB = connDb;

    beginDate = startDate;

    endDate = lastDate;

    threadSample = new java.lang.Thread(this, "SampleThread");

    System.out.println("threadSample created");

    threadSample.start();

    System.out.println("threadSample fired");
  }