Package org.springframework.retry.policy

Examples of org.springframework.retry.policy.NeverRetryPolicy


  @Test
  public void testRetryExceptionAfterTooManyAttempts() throws Exception {
    ((Advised) service).addAdvice(interceptor);
    RetryTemplate template = new RetryTemplate();
    template.setRetryPolicy(new NeverRetryPolicy());
    interceptor.setRetryOperations(template);
    try {
      service.service();
      fail("Expected Exception.");
    }
View Full Code Here


  @Test
  public void testRetryExceptionAfterTooManyAttemptsWithNoRecovery() throws Exception {
    ((Advised) service).addAdvice(interceptor);
    interceptor.setRetryOperations(retryTemplate);
    retryTemplate.setRetryPolicy(new NeverRetryPolicy());
    try {
      service.service("foo");
      fail("Expected Exception.");
    }
    catch (Exception e) {
View Full Code Here

  @Test
  public void testRecoveryAfterTooManyAttempts() throws Exception {
    ((Advised) service).addAdvice(interceptor);
    interceptor.setRetryOperations(retryTemplate);
    retryTemplate.setRetryPolicy(new NeverRetryPolicy());
    try {
      service.service("foo");
      fail("Expected Exception.");
    }
    catch (Exception e) {
View Full Code Here

  @Test
  public void testTransformerRecoveryAfterTooManyAttempts() throws Exception {
    ((Advised) transformer).addAdvice(interceptor);
    interceptor.setRetryOperations(retryTemplate);
    retryTemplate.setRetryPolicy(new NeverRetryPolicy());
    try {
      transformer.transform("foo");
      fail("Expected Exception.");
    }
    catch (Exception e) {
View Full Code Here

         * 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

TOP

Related Classes of org.springframework.retry.policy.NeverRetryPolicy

Copyright © 2018 www.massapicom. 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.