Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

The tomcat connection pooled datasource is registered with spring managed transaction manager in 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

  • No labels