Package org.aopalliance.aop

Examples of org.aopalliance.aop.Advice


    assertEquals("interceptors should be equal", interceptorA1, interceptorB1);
  }

  public void testNonEqualityBetweenInfrastructureProxies() throws Exception {
    Advice interceptorA1 = new InfrastructureOsgiProxyAdvice(new ServiceStaticInterceptor(bundleContext, ref));
    Advice interceptorB1 = new InfrastructureOsgiProxyAdvice(createInterceptorWOServiceRequired());

    assertFalse("interceptors should not be equal", interceptorA1.equals(interceptorB1));
  }
View Full Code Here


    });
    if (retryTemplate == null) {
      retryTemplate = new RetryTemplate();
    }
    factory.setRetryOperations(retryTemplate);
    Advice retryInterceptor = factory.getObject();
    return retryInterceptor;
  }
View Full Code Here

    fb.setRetryOperations(retryTemplate);

    // give him a reference to the retry cache so he can clean it up
    MissingMessageIdAdvice missingIdAdvice = new MissingMessageIdAdvice(cache);

    Advice retryInterceptor = fb.getObject();
    // add both advices
    container.setAdviceChain(new Advice[] {missingIdAdvice, retryInterceptor});
    container.start();

    template.convertAndSend("retry.test.exchange", "retry.test.binding", "Hello, world!");
View Full Code Here

    fb.setMessageRecoverer(new RejectAndDontRequeueRecoverer());

    // give him a reference to the retry cache so he can clean it up
    MissingMessageIdAdvice missingIdAdvice = new MissingMessageIdAdvice(cache);

    Advice retryInterceptor = fb.getObject();
    // add both advices
    container.setAdviceChain(new Advice[] {missingIdAdvice, retryInterceptor});
    container.start();

    MessageProperties messageProperties = new MessageProperties();
View Full Code Here

  @Test
  public void createContainerFullConfig() {
    Executor executor = mock(Executor.class);
    PlatformTransactionManager transactionManager = mock(PlatformTransactionManager.class);
    Advice advice = mock(Advice.class);

    setBasicConfig(this.factory);
    this.factory.setTaskExecutor(executor);
    this.factory.setTransactionManager(transactionManager);
    this.factory.setTxSize(10);
View Full Code Here

TOP

Related Classes of org.aopalliance.aop.Advice

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.