Implementing the Spring ChainedTransactionManager with the 1PC Best Practices Template

The best 1PC effort is well described in this post . Posted by David Sayer, who works for SpringSource, has provided an implementation ChainedTransactionManagerthat extends the Spring class AbstractPlatformTransactionManager.

This particular transaction manager can start n transactions, such as JDBC or JMS sessions, and commit / rollback using n instances AbstractPlatformTransactionManager, one per resource. This is very useful if XA drivers are not available. Since the post is very old, the code works fine with Spring 2.5, but with Spring 3+ error.

There is a query request to implement a similar function in Spring 3+. I am ready to try, but I thought I would first ask: are there any implementations there?

thank

+6
source share
2 answers

As suggested by Luciano, I found a perfectly working implementation ChainedTransactionManagerin:

<dependency>
  <groupId>org.springframework.data</groupId>
  <artifactId>spring-data-neo4j-tx</artifactId>
  <version>2.2.0.RELEASE</version>
</dependency>

class name: org.springframework.data.neo4j.transaction.ChainedTransactionManager

EDIT :

ChainedTransactionManageris now part of Spring Data Commons since version 1.6.1 .

+4
source

Here's a good blog post on how to implement ChainedTransactionManager for distributed transactions.

https://link.medium.com/hcOZlM1HuY

0
source

All Articles