Method with @Transactional commits the transaction when it returns. If you want to combine multiple transactional method in one transaction, propagation policy is the solution. Solution A To make a parent method with @Transactional To delete @Transactional at sub methods to combine the transaction Solution B To make a parent method with @Transactional (default propagation … Continue reading Combining multiple transactional method in one transaction
Tag: spring transaction
Spring Transaction with @Transactional explained
The most easy way to Spring Transaction is to use @Transactional. The following is basic step to use it. Required spring component spring-context.jar, spring-tx.jar, spring-jdbc.jar and additional dependencies Spring context <tx:annotation-driven> must be declared to enable @Transactional TransactionManager must be declared. If the id is not "transactionManager", it must be set with <tx:annotation-driven>'s transaction-manager attribute … Continue reading Spring Transaction with @Transactional explained