@SuppressWarnings("unchecked") @Override public void onSkipInWrite(S item, Throwable t) { if(skipWriteDelegate != null && t instanceof Exception) { try { /* * assuming this SkipListenerAdapter will only be called from JsrFaultTolerantChunkProcessor, * which calls onSkipInWrite() with the whole chunk (List) of items instead of single item */ skipWriteDelegate.onSkipWriteItem((List<Object>) item, (Exception) t); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@SuppressWarnings("unchecked") @Override public void onSkipInWrite(S item, Throwable t) { if(skipWriteDelegate != null && t instanceof Exception) { try { /* * assuming this SkipListenerAdapter will only be called from JsrFaultTolerantChunkProcessor, * which calls onSkipInWrite() with the whole chunk (List) of items instead of single item */ skipWriteDelegate.onSkipWriteItem((List<Object>) item, (Exception) t); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@SuppressWarnings("unchecked") @Override public void onSkipInWrite(S item, Throwable t) { if(skipWriteDelegate != null && t instanceof Exception) { try { /* * assuming this SkipListenerAdapter will only be called from JsrFaultTolerantChunkProcessor, * which calls onSkipInWrite() with the whole chunk (List) of items instead of single item */ skipWriteDelegate.onSkipWriteItem((List<Object>) item, (Exception) t); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@SuppressWarnings("unchecked") @Override public void onSkipInWrite(S item, Throwable t) { if(skipWriteDelegate != null && t instanceof Exception) { try { /* * assuming this SkipListenerAdapter will only be called from JsrFaultTolerantChunkProcessor, * which calls onSkipInWrite() with the whole chunk (List) of items instead of single item */ skipWriteDelegate.onSkipWriteItem((List<Object>) item, (Exception) t); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Override public void onSkipWriteItem(List items, Exception ex) { try { this.delegate.onSkipWriteItem(items, ex); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } }
@Override public void onSkipWriteItem(List items, Exception ex) { try { this.delegate.onSkipWriteItem(items, ex); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } }
@Override public void onSkipWriteItem(List items, Exception ex) { try { this.delegate.onSkipWriteItem(items, ex); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } }
/** * Handle exception from a write failure. */ public void handleExceptionWithRecordListWrite(final Exception e, final List<Object> items) { if (isSkipLimitReached() || !isSkippable(e)) { throw new BatchContainerRuntimeException(e); } // Skip it. Log it. Call the SkipListener. ++_skipCount; if (_skipWriteListener != null) { for (SkipWriteListener skipWriteListenerProxy : _skipWriteListener) { try { skipWriteListenerProxy.onSkipWriteItem(items, e); } catch (Exception e1) { ExceptionConfig.wrapBatchException(e1); } } } }
} else if (processingInfo.chunkState != ChunkState.JOB_STOPPED) { for (final SkipWriteListener l : skipWriteListeners) { l.onSkipWriteItem(outputList, e);