Ejemplo n.º 1
0
  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(MNo);

      try {

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

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

        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();
    }
  }
Ejemplo n.º 2
0
  public void ReceiptsRtf(
      java.sql.Connection connDb,
      java.lang.String combox,
      java.lang.String name,
      java.lang.String amount,
      java.lang.String receipt,
      java.lang.String paymode) {

    MNo = combox;

    Name = name;

    Amount = amount;

    Receipt = receipt;

    connectDB = connDb;

    Paymode = paymode;

    // beginDate = begindate;

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

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

    threadSample.start();

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