Package org.jberet.spi.ThreadContextSetup

Examples of org.jberet.spi.ThreadContextSetup.TearDownHandle.tearDown()


                    }
                    enclosingRunner.runJobElement(next, stepExecutions);
                }
            }
        } finally {
            handle.tearDown();
        }
    }

}
View Full Code Here


                batchContext.setBatchStatus(BatchStatus.STOPPED);
            }
            batchContext.saveInactiveStepExecutions();
            batchContext.getJobExecution().cleanUp();
        } finally {
            handle.tearDown();
        }
    }
}
View Full Code Here

            if (batchContext.getBatchStatus() == BatchStatus.COMPLETED) {
                final String next = resolveTransitionElements(flow.getTransitionElements(), flow.getAttributeNext(), false);
                enclosingRunner.runJobElement(next, batchContext.getFlowExecution().getLastStepExecution());
            }
        } finally {
            handle.tearDown();
        }
    }

}
View Full Code Here

                }
                jobContext.destroyArtifact(itemReader, itemWriter, itemProcessor, collector, checkpointAlgorithm);
                jobContext.destroyArtifact(allChunkRelatedListeners);
            }
        } finally {
            handle.tearDown();
        }
    }

    /**
     * The main read-process-write loop
View Full Code Here

                    public void run() {
                        final TearDownHandle handle = jobContext.getBatchEnvironment().getThreadContextSetup().setup();
                        try {
                            processingInfo.timerExpired = true;
                        } finally {
                            handle.tearDown();
                        }
                    }
                }, timeLimit * 1000);
            }
        } else {
View Full Code Here

            if (batchContext.getBatchStatus() == BatchStatus.COMPLETED) {
                final String next = resolveTransitionElements(step.getTransitionElements(), step.getAttributeNext(), false);
                enclosingRunner.runJobElement(next, stepExecution);
            }
        } finally {
            handle.tearDown();
        }
    }

    private void runBatchletOrChunk(final RefArtifact batchlet, final Chunk chunk) throws Exception {
        if (isPartitioned) {
View Full Code Here

                                batchletObj.stop();
                            }
                        } catch (Exception e) {
                            LOGGER.failToStopJob(e, jobContext.getJobName(), batchContext.getStepName(), batchletObj);
                        } finally {
                            handle.tearDown();
                        }
                    }
                });

                final String exitStatus = batchletObj.process();
View Full Code Here

                    stepRunner.completedPartitionThreads.offer(Boolean.TRUE);
                }
                jobContext.destroyArtifact(batchletObj, collector);
            }
        } finally {
            handle.tearDown();
        }
    }

}
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.