@Override public void beforeStep(StepExecution stepExecution) { try { delegate.beforeStep(); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Test(expected=BatchRuntimeException.class) public void testBeforeStepException() throws Exception { doThrow(new Exception("expected")).when(delegate).beforeStep(); adapter.beforeStep(null); }
@Test public void testBeforeStep() throws Exception { adapter.beforeStep(null); verify(delegate).beforeStep(); }
@Override public void beforeStep(StepExecution stepExecution) { try { delegate.beforeStep(); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Override public void beforeStep(StepExecution stepExecution) { try { delegate.beforeStep(); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Override public void beforeStep(StepExecution stepExecution) { try { delegate.beforeStep(); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Override public void beforeStep() { try { this.delegate.beforeStep(); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } } }
@Override public void beforeStep() { try { this.delegate.beforeStep(); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } } }
@Override public void beforeStep() { try { this.delegate.beforeStep(); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } } }
@Override protected void invokePreStepArtifacts() { // Don't call beforeStep() in the partitioned case, since we are now on a partition thread, and // have already called beforeStep() on the main thread as the spec says. if ((stepListeners != null) && (this.jobExecutionImpl.getPartitionInstance() == null)) { for (StepListener listenerProxy : stepListeners) { try { listenerProxy.beforeStep(); } catch (Exception e) { ExceptionConfig.wrapBatchException(e); } } } }
@Override protected void invokePreStepArtifacts() { if (stepListeners != null) { for (StepListener listenerProxy : stepListeners) { // Call beforeStep on all the step listeners try { listenerProxy.beforeStep(); } catch (Exception e) { ExceptionConfig.wrapBatchException(e); } } } // Invoke the reducer before all parallel steps start (must occur // before mapper as well) if (this.partitionReducerProxy != null) { try { this.partitionReducerProxy.beginPartitionedStep(); } catch (Exception e) { ExceptionConfig.wrapBatchException(e); } } }