Package javax.batch.runtime

Examples of javax.batch.runtime.BatchStatus


                completedPartitionThreads.take();
            }
            jobContext.getBatchEnvironment().getExecutorService().submit(runner1);
        }

        BatchStatus consolidatedBatchStatus = BatchStatus.STARTED;
        final List<StepExecutionImpl> fromAllPartitions = new ArrayList<StepExecutionImpl>();
        ut.begin();
        try {
            while (fromAllPartitions.size() < numOfPartitions) {
                final Serializable data = collectorDataQueue.take();
                if (data instanceof StepExecutionImpl) {
                    final StepExecutionImpl s = (StepExecutionImpl) data;
                    fromAllPartitions.add(s);
                    final BatchStatus bs = s.getBatchStatus();

                    if (bs == BatchStatus.FAILED || bs == BatchStatus.STOPPED) {
                        final List<Integer> idxes = s.getPartitionPropertiesIndex();
                        Integer idx = null;
                        if (idxes != null && idxes.size() > 0) {
View Full Code Here


            JobExecutionNotRunningException, JobSecurityException {
        final JobExecutionImpl jobExecution = (JobExecutionImpl) repository.getJobExecution(executionId);
        if (jobExecution == null) {
            throw LOGGER.noSuchJobExecution(executionId);
        }
        final BatchStatus s = jobExecution.getBatchStatus();
        if (s == BatchStatus.STOPPED || s == BatchStatus.FAILED || s == BatchStatus.ABANDONED ||
                s == BatchStatus.COMPLETED) {
            throw LOGGER.jobExecutionNotRunningException(executionId, s);
        } else if (s == BatchStatus.STOPPING) {
            //in process of stopping, do nothing
View Full Code Here

    @Override
    public List<Long> getRunningExecutions(final String jobName) throws NoSuchJobException, JobSecurityException {
        final List<Long> result = new ArrayList<Long>();
        boolean jobExists = false;
        for (final JobExecution e : repository.getJobExecutions()) {
            final BatchStatus s = e.getBatchStatus();
            if (e.getJobName().equals(jobName)) {
                jobExists = true;
                if (s == BatchStatus.STARTING || s == BatchStatus.STARTED) {
                    result.add(e.getExecutionId());
                }
View Full Code Here

        long newExecutionId = 0;
        final JobExecutionImpl originalToRestart = (JobExecutionImpl) getJobExecution(executionId);
        if (originalToRestart == null) {
            throw LOGGER.noSuchJobExecution(executionId);
        }
        final BatchStatus previousStatus = originalToRestart.getBatchStatus();
        if (previousStatus == BatchStatus.COMPLETED) {
            throw LOGGER.jobExecutionAlreadyCompleteException(executionId);
        }
        if (previousStatus == BatchStatus.ABANDONED ||
                previousStatus == BatchStatus.STARTED ||
View Full Code Here

     *
     * @throws Exception BAM!
     */
    @Test
    public void testJustReadAndWrite() throws Exception {
        final BatchStatus batchStatus = this.executeJob("justReadAndWrite"); // justReadAndWrite.job.xml
        assertEquals(BatchStatus.COMPLETED, batchStatus);
    }
View Full Code Here

     *
     * @throws Exception BAM!
     */
    @Test
    public void testSkipItemsDueException() throws Exception {
        final BatchStatus batchStatus = this.executeJob("skipItems");
        assertEquals(BatchStatus.COMPLETED, batchStatus);
    }
View Full Code Here

     *
     * @throws Exception BAM!
     */
    @Test
    public void testRetryItemsDueException() throws Exception {
        final BatchStatus batchStatus = this.executeJob("retryItems");
        assertEquals(BatchStatus.COMPLETED, batchStatus);
    }
View Full Code Here

     *
     * @throws Exception BAM!
     */
    @Test
    public void testParallelSplit() throws Exception {
        final BatchStatus batchStatus = this.executeJob("parallelSplit");
        assertEquals(BatchStatus.COMPLETED, batchStatus);
    }
View Full Code Here

     *
     * @throws Exception BAM!
     */
    @Test
    public void testParallelPartitions() throws Exception {
        final BatchStatus batchStatus = this.executeJob("parallelPartitions");
        assertEquals(BatchStatus.COMPLETED, batchStatus);
    }
View Full Code Here

     *
     * @throws Exception BAM!
     */
    @Test
    public void testDecisions() throws Exception {
        final BatchStatus batchStatus = this.executeJob("decisions");
        assertEquals(BatchStatus.COMPLETED, batchStatus);
    }
View Full Code Here

TOP

Related Classes of javax.batch.runtime.BatchStatus

Copyright © 2018 www.massapicom. 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.