@Override public void onRetryWriteException(List<Object> items, Exception ex) throws Exception { try { retryWriteListener.onRetryWriteException(items, ex); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Test(expected = JobStartException.class) public void testBeanCreationExceptionOnStart() throws Exception { jsrJobOperator = BatchRuntime.getJobOperator(); try { jsrJobOperator.start("jsrJobOperatorTestBeanCreationException", null); } catch (JobStartException e) { assertTrue(e.getCause() instanceof BeanCreationException); throw e; } fail("Should have failed"); }
@Override public boolean isComplete(RepeatContext context) { try { isComplete = policy.isReadyToCheckpoint(); return isComplete; } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Override public RepeatContext start(RepeatContext parent) { try { policy.beginCheckpoint(); } catch (Exception e) { throw new BatchRuntimeException(e); } return parent; }
@SuppressWarnings("unchecked") @Override public void onWriteError(Exception exception, List<? extends S> items) { try { delegate.onWriteError((List<Object>) items, exception); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Override public void onReadError(Exception ex) { try { delegate.onReadError(ex); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Override public void onRetryReadException(Exception ex) throws Exception { try { retryReadListener.onRetryReadException(ex); } 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 onRetryReadException(Exception ex) throws Exception { try { retryReadListener.onRetryReadException(ex); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Override public void onRetryProcessException(Object item, Exception ex) throws Exception { try { retryProcessListener.onRetryProcessException(item, ex); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@SuppressWarnings("unchecked") @Override public void afterWrite(List<? extends S> items) { try { delegate.afterWrite((List<Object>) items); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Override public void onRetryProcessException(Object item, Exception ex) throws Exception { try { retryProcessListener.onRetryProcessException(item, ex); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Override public void afterJob(JobExecution jobExecution) { try { delegate.afterJob(); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@SuppressWarnings("unchecked") @Override public void beforeWrite(List<? extends S> items) { try { delegate.beforeWrite((List<Object>) items); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Override public void onSkipInRead(Throwable t) { if(skipReadDelegate != null && t instanceof Exception) { try { skipReadDelegate.onSkipReadItem((Exception) t); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Override public void onSkipInProcess(T item, Throwable t) { if(skipProcessDelegate != null && t instanceof Exception) { try { skipProcessDelegate.onSkipProcessItem(item, (Exception) t); } catch (Exception e) { throw new BatchRuntimeException(e); } } } }
@Override public void beforeProcess(T item) { try { delegate.beforeProcess(item); } catch (Exception e) { throw new BatchRuntimeException(e); } }
@Override public void onProcessError(T item, Exception e) { try { delegate.onProcessError(item, e); } catch (Exception e1) { throw new BatchRuntimeException(e1); } } }
@Override public void onRetryWriteException(List<Object> items, Exception ex) throws Exception { try { retryWriteListener.onRetryWriteException(items, ex); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Override public void beforeRead() { try { delegate.beforeRead(); } catch (Exception e) { throw new BatchRuntimeException(e); } }