Package org.springframework.transaction

Examples of org.springframework.transaction.CallCountingTransactionManager


      return new PersistenceExceptionTranslationPostProcessor();
    }

    @Bean
    public PlatformTransactionManager txManager() {
      return new CallCountingTransactionManager();
    }
View Full Code Here


  private CallCountingTransactionManager ptm;
  private AnnotationTransactionAttributeSource source;
  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

    assertTrue("testBean is not a proxy", AopUtils.isAopProxy(bean));
  }

  public void testInvokeTransactional() throws Exception {
    TransactionalTestBean testBean = getTestBean();
    CallCountingTransactionManager ptm = (CallCountingTransactionManager) context.getBean("transactionManager");

    // try with transactional
    assertEquals("Should not have any started transactions", 0, ptm.begun);
    testBean.findAllFoos();
    assertEquals("Should have 1 started transaction", 1, ptm.begun);
View Full Code Here

  }
 
  // TODO: this test is failing (see SPR-2514)
  public void testNonPublicMethodsNotAdvised() {
    TransactionalTestBean testBean = getTestBean();
    CallCountingTransactionManager ptm = (CallCountingTransactionManager) context.getBean("transactionManager");

    assertEquals("Should not have any started transactions", 0, ptm.begun);
    testBean.annotationsOnProtectedAreIgnored();
    assertEquals("Should not have any started transactions", 0, ptm.begun);   
  }
View Full Code Here

TOP

Related Classes of org.springframework.transaction.CallCountingTransactionManager

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.