Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1253

ChainedTransactionManager and Ignite SpringTransactionManager


    • Type: Bug
    • Status: Waiting for Feedback
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:


      I am using Apache Ignite's SpringTransactionManager in combination with HibernateTransactionManager in a ChainedTransactionManager in order to rollback all database and cache updates in the event of there being any failures in either transaction manager. I am finding that rollbacks in HibernateTransactionManager do cause rollbacks in SpringTransactionManager but not vice versa. Hibernate changes are not rolled back when Ignite transactions rollback.

      Logs from running the test:

      2018-02-02 15:09:00,509 DEBUG [unknown] main unknown unknown {AbstractPlatformTransactionManager.java:367} - Creating new transaction with name [com.dna.chain.service.impl.TestServiceImpl.testeroo]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT; 'chainedTransactionManager'
      2018-02-02 15:09:00,514 DEBUG [unknown] main unknown unknown {AbstractPlatformTransactionManager.java:851} - Initiating transaction rollback
      2018-02-02 15:09:00,514 DEBUG [unknown] main unknown unknown {AbstractPlatformTransactionManager.java:1020} - Resuming suspended transaction after completion of inner transaction

      Here is how the transaction managers are configured and the test method:

      public void testeroo(Consumer<Params> consumer, Params params) {
      // Inserts params into databases first and then puts params into caches
      public final class Scenario2 implements Consumer<Params> {
          public void accept(Params params) {
      	_cache_1.put(pair.getFirst(), pair.getSecond());
      	throw new RuntimeException("inbound is null")
      public ChainedTransactionManager chainedTransactionManager(@Qualifier("hibernateTxMgr") PlatformTransactionManager hibernateTxMgr,
          @Qualifier("igniteTxMgr") PlatformTransactionManager igniteTxMgr) {
          ChainedTransactionManager transactionManager = new ChainedTransactionManager(
              new PlatformTransactionManager[] { hibernateTxMgr, igniteTxMgr });
          return transactionManager;
      public PlatformTransactionManager hibernateTxMgr(@Qualifier("sessionFactory")SessionFactory sessionFactory) {
          HibernateTransactionManager manager = new HibernateTransactionManager(sessionFactory);
          return manager;
      public PlatformTransactionManager igniteTxMgr(IgniteSpringBean ignite) throws IOException {
          SpringTransactionManager igniteTxMgr = new SpringTransactionManager();
          return igniteTxMgr;




            • Assignee:
              olivergierke Oliver Drotbohm
              supercube Stephen Murphy
              Last updater:
              Stephen Murphy
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: