Search in sources :

Example 1 with JobStartException

use of javax.batch.operations.JobStartException in project javaee7-firstcup by ecabrerar.

the class SalesBean method runJob.

public void runJob() {
    try {
        JobOperator jo = BatchRuntime.getJobOperator();
        long jobId = jo.start("eod-sales", new Properties());
        System.out.println("Started job: with id: " + jobId);
    } catch (JobStartException ex) {
        ex.printStackTrace();
    }
}
Also used : JobStartException(javax.batch.operations.JobStartException) JobOperator(javax.batch.operations.JobOperator) Properties(java.util.Properties)

Aggregations

Properties (java.util.Properties)1 JobOperator (javax.batch.operations.JobOperator)1 JobStartException (javax.batch.operations.JobStartException)1