Package javax.batch.operations

Examples of javax.batch.operations.JobOperator.start()


     * @throws Exception an exception if the batch could not complete successfully.
     */
    @Test
    public void testBatchChunkMapper() throws Exception {
        JobOperator jobOperator = BatchRuntime.getJobOperator();
        Long executionId = jobOperator.start("myJob", new Properties());
        JobExecution jobExecution = jobOperator.getJobExecution(executionId);

        BatchTestHelper.keepTestAlive(jobExecution);

        List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
View Full Code Here


     * @throws Exception an exception if the batch could not complete successfully.
     */
    @Test
    public void testBatchChunkCheckpoint() throws Exception {
        JobOperator jobOperator = BatchRuntime.getJobOperator();
        Long executionId = jobOperator.start("myJob", new Properties());
        JobExecution jobExecution = jobOperator.getJobExecution(executionId);

        BatchTestHelper.keepTestAlive(jobExecution);

        List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
View Full Code Here

     * @throws Exception an exception if the batch could not complete successfully.
     */
    @Test
    public void testChunkSimple() throws Exception {
        JobOperator jobOperator = BatchRuntime.getJobOperator();
        Long executionId = jobOperator.start("myJob", new Properties());
        JobExecution jobExecution = jobOperator.getJobExecution(executionId);

        BatchTestHelper.keepTestAlive(jobExecution);

        List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
View Full Code Here

     * @throws Exception an exception if the batch could not complete successfully.
     */
    @Test
    public void testBatchChunkPartition() throws Exception {
        JobOperator jobOperator = BatchRuntime.getJobOperator();
        Long executionId = jobOperator.start("myJob", new Properties());
        JobExecution jobExecution = jobOperator.getJobExecution(executionId);

        BatchTestHelper.keepTestAlive(jobExecution);

        List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
View Full Code Here

     * @throws Exception an exception if the batch could not complete successfully.
     */
    @Test
    public void testBatchFlow() throws Exception {
        JobOperator jobOperator = BatchRuntime.getJobOperator();
        Long executionId = jobOperator.start("myJob", new Properties());
        JobExecution jobExecution = jobOperator.getJobExecution(executionId);

        BatchTestHelper.keepTestAlive(jobExecution);

        List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
View Full Code Here

@WebServlet("/batch")
public class BatchServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        JobOperator jo = BatchRuntime.getJobOperator();
        long jid = jo.start("myJob", new Properties());

        resp.getWriter().printf("Batch job with id %d started %n", jid);
        resp.getWriter().flush();
    }
}
View Full Code Here

            out.println("<body>");
            out.println("<h1>Servlet TestServlet at " + request.getContextPath() + "</h1>");
            out.println("About to start the job<br>");
            JobOperator jo = BatchRuntime.getJobOperator();
            out.println("Got the job operator: " + jo + "<br>");
            long jid = jo.start("myJob", new Properties());
            out.println("Job submitted: " + jid + "<br>");
            out.println(jo.getJobInstanceCount("myJob") + " job instance found<br/>");
            JobExecution je = jo.getJobExecution(jid);
//            jo.abandon(jid);
            out.println("Job created on: " + je.getCreateTime() + "<br>");
View Full Code Here

            out.println("<body>");
            out.println("<h1>Batch Decision</h1>");
            out.println("About to start the job<br>");
            JobOperator jo = BatchRuntime.getJobOperator();
            out.println("Got the job operator: " + jo + "<br>");
            jo.start("myJob", new Properties());
            out.println("Job submitted<br>");
            out.println("<br><br>Check server.log for output, also look at \"myJob.xml\" for Job XML.");
            out.println("</body>");
            out.println("</html>");
        } catch (JobStartException | JobSecurityException ex) {
View Full Code Here

        /*
         This points to the META-INF/batch-jobs/simple.job.xml
         */
        LOG.info("Starting job \'simple.job\'");
        final long executionId = jobOperator.start("simple.job", props);
        LOG.info("Done, execution ID is: " + executionId);
        return executionId;
    }

    /**
 
View Full Code Here

        /*
         This points to the META-INF/batch-jobs/justReadAndWrite.job.xml
         */
        LOG.info("Starting job " + name);
        final long executionId = jobOperator.start(name + ".job", props);
        LOG.info("Execution ID is: " + executionId);
        return executionId;
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.