Package org.springframework.data.transaction.ChainedTransactionManagerTests

Examples of org.springframework.data.transaction.ChainedTransactionManagerTests.TestPlatformTransactionManager


      this.name = name;
    }

    @Factory
    static PlatformTransactionManager createFailingTransactionManager(String name) {
      return new TestPlatformTransactionManager(name + "-failing") {
        @Override
        public void commit(TransactionStatus status) throws TransactionException {
          throw new RuntimeException();
        }
View Full Code Here


      };
    }

    @Factory
    static PlatformTransactionManager createNonFailingTransactionManager(String name) {
      return new TestPlatformTransactionManager(name + "-non-failing");
    }
View Full Code Here

      this.commitCheck = commitCheck;
    }

    @Override
    public boolean matchesSafely(PlatformTransactionManager platformTransactionManager) {
      TestPlatformTransactionManager ptm = (TestPlatformTransactionManager) platformTransactionManager;
      if (commitCheck) {
        return ptm.isCommitted();
      } else {
        return ptm.wasRolledBack();
      }

    }
View Full Code Here

TOP

Related Classes of org.springframework.data.transaction.ChainedTransactionManagerTests.TestPlatformTransactionManager

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.