Compared with the plain JDBC example (in Java - Data - Transaction Management - Java Transaction API (JTA)):
- You do not have to mess with opening or closing database connections yourself (try-finally). Instead you use Transaction Callbacks.
- You also do not have to catch
SQLExceptions, as Spring converts these exceptions to runtime exceptions for you
Transaction Configuration
Transaction Creation
|
Programmatically |
| |
|---|---|---|
| ||
|
Declaratively |
|
Transaction - Other
- Java - Spring - Logical Transaction vs Physical Transaction - Propagation Level
- Java - Spring - Transaction Bound Events - @TransactionalEventListener