Package org.springframework.transaction.interceptor.TransactionAspectSupport

Examples of org.springframework.transaction.interceptor.TransactionAspectSupport.TransactionInfo


   
    final String spouseName = "innerName";

    TestBean outer = new TestBean() {
      public void exceptional(Throwable t) throws Throwable {
        TransactionInfo ti = TransactionAspectSupport.currentTransactionInfo();
        assertTrue(ti.hasTransaction());
        assertEquals(spouseName, getSpouse().getName());
      }
    };
    TestBean inner = new TestBean() {
      public String getName() {
        // Assert that we're in the inner proxy
        TransactionInfo ti = TransactionAspectSupport.currentTransactionInfo();
        assertFalse(ti.hasTransaction());
        return spouseName;
      }
    };
   
    ITestBean outerProxy = (ITestBean) advised(outer, ptm, tas);
View Full Code Here


   
    final String spouseName = "innerName";

    TestBean outer = new TestBean() {
      public void exceptional(Throwable t) throws Throwable {
        TransactionInfo ti = TransactionAspectSupport.currentTransactionInfo();
        assertTrue(ti.hasTransaction());
        assertEquals(outerTxatt, ti.getTransactionAttribute());
        assertEquals(spouseName, getSpouse().getName());
      }
    };
    TestBean inner = new TestBean() {
      public String getName() {
        // Assert that we're in the inner proxy
        TransactionInfo ti = TransactionAspectSupport.currentTransactionInfo();
        // Has nested transaction
        assertTrue(ti.hasTransaction());
        assertEquals(innerTxatt, ti.getTransactionAttribute());
        return spouseName;
      }
    };
   
    ITestBean outerProxy = (ITestBean) advised(outer, ptm, tas);
View Full Code Here

    final String spouseName = "innerName";

    TestBean outer = new TestBean() {
      @Override
      public void exceptional(Throwable t) throws Throwable {
        TransactionInfo ti = TransactionAspectSupport.currentTransactionInfo();
        assertTrue(ti.hasTransaction());
        assertEquals(spouseName, getSpouse().getName());
      }
    };
    TestBean inner = new TestBean() {
      @Override
      public String getName() {
        // Assert that we're in the inner proxy
        TransactionInfo ti = TransactionAspectSupport.currentTransactionInfo();
        assertFalse(ti.hasTransaction());
        return spouseName;
      }
    };

    ITestBean outerProxy = (ITestBean) advised(outer, ptm, tas);
View Full Code Here

    final String spouseName = "innerName";

    TestBean outer = new TestBean() {
      @Override
      public void exceptional(Throwable t) throws Throwable {
        TransactionInfo ti = TransactionAspectSupport.currentTransactionInfo();
        assertTrue(ti.hasTransaction());
        assertEquals(outerTxatt, ti.getTransactionAttribute());
        assertEquals(spouseName, getSpouse().getName());
      }
    };
    TestBean inner = new TestBean() {
      @Override
      public String getName() {
        // Assert that we're in the inner proxy
        TransactionInfo ti = TransactionAspectSupport.currentTransactionInfo();
        // Has nested transaction
        assertTrue(ti.hasTransaction());
        assertEquals(innerTxatt, ti.getTransactionAttribute());
        return spouseName;
      }
    };

    ITestBean outerProxy = (ITestBean) advised(outer, ptm, tas);
View Full Code Here

TOP

Related Classes of org.springframework.transaction.interceptor.TransactionAspectSupport.TransactionInfo

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.