Question

How can I get the transaction object to be able to use it in my service layer when I'm using this configuration?

<neo4j:config storeDirectory="D:/neo4j-2.0.1/data/mydb"/>   
<neo4j:repositories base-package="com.myapp.repository" />

<tx:annotation-driven mode="proxy"/>

I'm using Neo4j 2.0.1, Spring data Neo4j 3.0.0 and Spring 3.2.8

Thank you!

Was it helpful?

Solution

You can inject NeoTemplate object into your service, if you are not going to use repositories. Transaction can be managed as always with @Transactional annotation!

Cheers, Lorenzo

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top