Examples of NeverRetryPolicy


Examples of org.springframework.retry.policy.NeverRetryPolicy

            };
        }
       
        public final Advice[] getAdviceChain() {
            RetryTemplate retryRule = new RetryTemplate();
            retryRule.setRetryPolicy(new NeverRetryPolicy());
           
            StatefulRetryOperationsInterceptorFactoryBean retryOperation = new StatefulRetryOperationsInterceptorFactoryBean();
            retryOperation.setRetryOperations(retryRule);
            retryOperation.setMessageKeyGeneretor(new DefaultKeyGenerator());
           
View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

         * Do not have Spring AMQP re-try messages upon failure, leave it to Camel
         * @return An advice chain populated with a NeverRetryPolicy
         */
        public final Advice[] getAdviceChain() {
            RetryTemplate retryRule = new RetryTemplate();
            retryRule.setRetryPolicy(new NeverRetryPolicy());
           
            StatefulRetryOperationsInterceptorFactoryBean retryOperation = new StatefulRetryOperationsInterceptorFactoryBean();
            retryOperation.setRetryOperations(retryRule);
            retryOperation.setMessageKeyGeneretor(new DefaultKeyGenerator());
           
View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

            };
        }
       
        public final Advice[] getAdviceChain() {
            RetryTemplate retryRule = new RetryTemplate();
            retryRule.setRetryPolicy(new NeverRetryPolicy());
            StatefulRetryOperationsInterceptorFactoryBean retryOperation = new StatefulRetryOperationsInterceptorFactoryBean();
            retryOperation.setRetryOperations(retryRule);
            return new Advice[] { retryOperation.getObject() };
        }
View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

         * Do not have Spring AMQP re-try messages upon failure, leave it to Camel
         * @return An advice chain populated with a NeverRetryPolicy
         */
        public final Advice[] getAdviceChain() {
            RetryTemplate retryRule = new RetryTemplate();
            retryRule.setRetryPolicy(new NeverRetryPolicy());
           
            StatefulRetryOperationsInterceptorFactoryBean retryOperation = new StatefulRetryOperationsInterceptorFactoryBean();
            retryOperation.setRetryOperations(retryRule);
            retryOperation.setMessageKeyGeneretor(new DefaultKeyGenerator());
           
View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

         * Do not have Spring AMQP re-try messages upon failure, leave it to Camel
         * @return An advice chain populated with a NeverRetryPolicy
         */
        public final Advice[] getAdviceChain() {
            RetryTemplate retryRule = new RetryTemplate();
            retryRule.setRetryPolicy(new NeverRetryPolicy());
           
            StatefulRetryOperationsInterceptorFactoryBean retryOperation = new StatefulRetryOperationsInterceptorFactoryBean();
            retryOperation.setRetryOperations(retryRule);
            retryOperation.setMessageKeyGeneretor(new DefaultKeyGenerator());
           
View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

  private RetryOperations retryOperations;

  public StatefulRetryOperationsInterceptor() {
    RetryTemplate retryTemplate = new RetryTemplate();
    retryTemplate.setRetryPolicy(new NeverRetryPolicy());
    retryOperations = retryTemplate;
  }
View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

         * Do not have Spring AMQP re-try messages upon failure, leave it to Camel
         * @return An advice chain populated with a NeverRetryPolicy
         */
        public final Advice[] getAdviceChain() {
            RetryTemplate retryRule = new RetryTemplate();
            retryRule.setRetryPolicy(new NeverRetryPolicy());
           
            StatefulRetryOperationsInterceptorFactoryBean retryOperation = new StatefulRetryOperationsInterceptorFactoryBean();
            retryOperation.setRetryOperations(retryRule);
            retryOperation.setMessageKeyGenerator(new DefaultKeyGenerator());
           
View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

   * Test method for
   * {@link org.springframework.batch.core.step.item.SimpleRetryExceptionHandler#handleException(org.springframework.batch.repeat.RepeatContext, java.lang.Throwable)} .
   */
  public void testRethrowWhenRetryExhausted() throws Throwable {

    RetryPolicy retryPolicy = new NeverRetryPolicy();
    RuntimeException ex = new RuntimeException("foo");

    SimpleRetryExceptionHandler handler = getHandlerAfterRetry(retryPolicy, ex, Collections
        .<Class<? extends Throwable>> singleton(Error.class));

View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

              throw new RuntimeException("Planned failure!");
            }
            list.addAll(items);
          }
        }, batchRetryTemplate);
    batchRetryTemplate.setRetryPolicy(new NeverRetryPolicy());
  }
View Full Code Here

Examples of org.springframework.retry.policy.NeverRetryPolicy

   * Wrap the provided {@link org.springframework.retry.RetryPolicy} so that it never retries explicitly non-retryable
   * exceptions.
   */
  private RetryPolicy getFatalExceptionAwareProxy(RetryPolicy retryPolicy) {

    NeverRetryPolicy neverRetryPolicy = new NeverRetryPolicy();
    Map<Class<? extends Throwable>, RetryPolicy> map = new HashMap<Class<? extends Throwable>, RetryPolicy>();
    for (Class<? extends Throwable> fatal : nonRetryableExceptionClasses) {
      map.put(fatal, neverRetryPolicy);
    }

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.