Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing Spring ChainedTransactionManager according to the "best efforts 1PC" pattern [closed]

The best effort 1PC is nicely described in this post. The author, David Syer, who works for SpringSource, provided an implementation of a ChainedTransactionManager extending the Spring AbstractPlatformTransactionManager class.

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

There is a request ticket to implement a similar feature in Spring 3+. I'm willing to give it a try but I thought I'd ask first: are there any implementations out there?

Thanks

like image 500
Giovanni Botta Avatar asked Apr 04 '13 17:04

Giovanni Botta


1 Answers

As suggested by Luciano, I found a perfectly working implementation of ChainedTransactionManager in:

<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:

The ChainedTransactionManager is now part of Spring Data Commons as of version 1.6.1.

like image 180
Giovanni Botta Avatar answered Oct 29 '22 23:10

Giovanni Botta