Aug 21st, 2012, 07:15 PM
Cross Store Transaction Managers
So I have been using the cross store github project for Spring Data and it has helped tremendously.
However, in my Neo4J config I have <tx:annotation-driven mode="aspectj" transaction-manager="neo4jTransactionManager"/>
So that sets up transactions for Neo4J. But I also have a jpa TransactionManager called "transactionManager" and if I try to put @Transactional on my services, even if I call them I get an error about there not being a transaction running when I call JpaRepository method saveAndFlush() on the data I have that is using JPA.
How can I get all them to work.
Unfortunately, in the https://github.com/SpringSource/spri...ultistore-test project, there is only one transaction manager declared and only for JPA. And even if there was more than one, the only code using the Repository is the JUnit test class that has @TransactionConfiguration on the class to point to only one transaction manager. Which we can't do in application code.