Skip to Content
Spring Start Here
book

Spring Start Here

by Laurentiu Spilca
October 2021
Beginner content levelBeginner
416 pages
11h 25m
English
Manning Publications
Content preview from Spring Start Here

13 Using transactions in Spring apps

This chapter covers

  • What a transaction is
  • How Spring manages transactions
  • Using transactions in a Spring app

One of the most important things we take into consideration when managing data is to keep accurate data. We don’t want specific execution scenarios to end up with wrong or inconsistent data. Let me give you an example. Suppose you implement an application used to share money—an electronic wallet. In this application, a user has accounts where they store their money. You implement a functionality to allow a user to transfer money from one account to another. Considering a simplistic implementation for our example, this implies two steps (figure 13.1):

  1. Withdraw money from the source account.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Spring Boot in Action

Spring Boot in Action

Craig Walls
The Complete Java Developer Course: From Beginner to Master

The Complete Java Developer Course: From Beginner to Master

Codestars By Rob Percival, John P. Baugh

Publisher Resources

ISBN: 9781617298691Publisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link