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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With