SimpleRetryExceptionHandler exceptionHandler = new SimpleRetryExceptionHandler(retryPolicyWrapper, getExceptionHandler(), nonRetryableExceptionClasses); ((RepeatTemplate) stepOperations).setExceptionHandler(exceptionHandler);
/** * @param retryPolicy * @param ex * @return */ private SimpleRetryExceptionHandler getHandlerAfterRetry(RetryPolicy retryPolicy, RuntimeException ex, Collection<Class<? extends Throwable>> fatalExceptions) { // Always rethrow if the retry is exhausted SimpleRetryExceptionHandler handler = new SimpleRetryExceptionHandler(retryPolicy, new SimpleLimitExceptionHandler(0), fatalExceptions); // Simulate a failed retry... RetryContext retryContext = retryPolicy.open(null); retryPolicy.registerThrowable(retryContext, ex); handler.close(retryContext, null, ex); return handler; }
SimpleRetryExceptionHandler exceptionHandler = new SimpleRetryExceptionHandler(retryPolicyWrapper, getExceptionHandler(), nonRetryableExceptionClasses); ((RepeatTemplate) stepOperations).setExceptionHandler(exceptionHandler);
SimpleRetryExceptionHandler exceptionHandler = new SimpleRetryExceptionHandler(retryPolicyWrapper, getExceptionHandler(), nonRetryableExceptionClasses); ((RepeatTemplate) stepOperations).setExceptionHandler(exceptionHandler);
SimpleRetryExceptionHandler exceptionHandler = new SimpleRetryExceptionHandler(retryPolicyWrapper, getExceptionHandler(), nonRetryableExceptionClasses); ((RepeatTemplate) stepOperations).setExceptionHandler(exceptionHandler);
SimpleRetryExceptionHandler exceptionHandler = new SimpleRetryExceptionHandler(retryPolicyWrapper, getExceptionHandler(), nonRetryableExceptionClasses); ((RepeatTemplate) stepOperations).setExceptionHandler(exceptionHandler);