6 Managing Transactions with Spring
WHAT YOU WILL LEARN IN THIS CHAPTER:
- Understanding how transaction management works
- Advantages of Spring's transaction abstraction
- Performing declarative and programmatic transaction management with Spring
- Differences between local and global transactions
- Choosing among different transaction managers
- Differences between various transaction propagation rules
- Executing custom logic after transaction commits or rollbacks
Protecting the integrity of data in an enterprise application is probably the most important thing. After all, an application that corrupts balances of its customers during a money transfer operation is certainly unacceptable, despite how fast that application operates or how nice it looks to its users.
Database transactions protect the integrity of data that is operated on. They are managed by the application, and several data access operations performed within their boundaries are seen as a single atomic unit. They are either persisted or discarded altogether, according to the outcome of the business scenario. Atomicity is one of the several defining properties of transactions, along with consistency, isolation, and durability. Each characteristic plays an important role in protecting ...
Get Beginning Spring now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.