Package org.springframework.transaction.interceptor

Examples of org.springframework.transaction.interceptor.TransactionInterceptor$ThrowableHolder


      assertEquals("Should have 1 rolled back transaction", 1, ptm.rollbacks);
    }
  }

  public void testRollbackRules() {
    TransactionInterceptor txInterceptor = (TransactionInterceptor) context.getBean("txRollbackAdvice");
    TransactionAttributeSource txAttrSource = txInterceptor.getTransactionAttributeSource();
    TransactionAttribute txAttr = txAttrSource.getTransactionAttribute(getAgeMethod,ITestBean.class);
    assertTrue("should be configured to rollback on Exception",txAttr.rollbackOn(new Exception()));

    txAttr = txAttrSource.getTransactionAttribute(setAgeMethod, ITestBean.class);
    assertFalse("should not rollback on RuntimeException",txAttr.rollbackOn(new RuntimeException()));
View Full Code Here


  @Override
  public void setUp() {
    this.ptm = new CallCountingTransactionManager();
    this.source = new AnnotationTransactionAttributeSource();
    this.ti = new TransactionInterceptor(this.ptm, this.source);
  }
View Full Code Here

  private TransactionInterceptor ti;

  public void setUp() {
    this.ptm = new CallCountingTransactionManager();
    this.source = new AnnotationTransactionAttributeSource();
    this.ti = new TransactionInterceptor(this.ptm, this.source);
  }
View Full Code Here

  }

  private void initializeProxy() throws Exception {
    if (proxyFactory == null) {
      proxyFactory = new ProxyFactory();
      TransactionInterceptor advice = new TransactionInterceptor(transactionManager,
          PropertiesConverter.stringToProperties("create*=PROPAGATION_REQUIRES_NEW,"
              + isolationLevelForCreate + "\ngetLastJobExecution*=PROPAGATION_REQUIRES_NEW,"
              + isolationLevelForCreate + "\n*=PROPAGATION_REQUIRED"));
      if (validateTransactionState) {
        DefaultPointcutAdvisor advisor = new DefaultPointcutAdvisor(new MethodInterceptor() {
View Full Code Here

TOP

Related Classes of org.springframework.transaction.interceptor.TransactionInterceptor$ThrowableHolder

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.