Transaction management strategies in Spring
Spring provides comprehensive support for transaction management in a Spring application. This is one the most compelling features of the Spring Framework. Mostly, this feature forces software industries to develop enterprise applications with the Spring Framework. The Spring Framework provides a consistent way to manage transactions across the application using any persistence technology, such as Java Transaction API , JDBC, Hibernate, Java Persistence API, and Java Data Objects. Spring supports declarative transaction management as well as programmatic transaction management.
There are two types of Java transactions, which are as follows:
- Local transactions - single resource: Local transactions managed by the underlying resource; these are resource-specific. Let's explain this with the help of the following diagram:
As you can see in the preceding diagram, there is a transaction working between the application and the database platforms to ensure...