This page is a work in progress.
This page is a work in progress. This info box will be removed once complete.
The tomcat connection pooled datasource is registered with spring managed transaction manager in the persistence_postgres.xml
<tx:annotation-driven transaction-manager="openSRPTransactionManager" />
<bean id="openSRPTransactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="openSRPDataSource" />
</bean>
Spring transaction management can be used to define transactions
To define a method or class as having a transaction or part of a transaction simply annotate the method with @Transactional annotation.
Use the documentation on https://docs.spring.io/spring/docs/3.1.x/spring-framework-reference/html/transaction.html to learn more about spring managed transactions