I have a class that is annotated with @Service
. I have a method that should update two different data sources (database and a content repository). I have added @Transactional
over the method in the service class. Without any further customizations; is it correct that the two repository classes (annotated with @Repository
) is runned within the same transaction?
I am using JBoss 7.1.1 and I have these two lines in the Spring (3.2) config:
<tx:jta-transaction-manager/>
<tx:annotation-driven proxy-target-class="true"/>
Or does this run in two different transactions? I want to only commit the data when no runtime exceptions is thrown inside the service layer method. It is invoked from a controller method (class annotated with @Controller
).
I will add 500 bounty as soon as possible to the guy that helps me get Jackrabbit and a database connection to run in the same transaction. I am using JBoss 7.1.1, Spring 3.2, Jackrabbit 2.6.2 JCA.