Spring provides different transaction managers, based on different platforms. Here, a different platform means a different persistence framework, such as JDBC, MyBatis, Hibernate, and Java Transaction API (JTA). So, we have to choose the transaction manager provided by Spring accordingly.
The following diagram describes platform-specific transaction management provided by Spring:
Spring supports two types of transaction management:
- Programmatic: This means that we can write our transactions using Java source code directly. This gives us extreme flexibility, but it is difficult to maintain.
- Declarative: This ...