Chapter 6. Managing transactions

 

This chapter covers

  • Integrating with transaction managers
  • Managing transactions programmatically
  • Using declarative transactions
  • Describing transactions using annotations

Take a moment to recall your younger days. If you were like many children, you spent more than a few carefree moments on the playground swinging on the swings, traversing the monkey bars, getting dizzy while spinning on the merry-go-round, and going up and down on the teeter-totter.

The problem with the teeter-totter is that it’s practically impossible to enjoy on your own. To truly enjoy a teeter-totter, you need another person: you and a friend both have to agree to play on the teeter-totter. This agreement is an all-or-nothing proposition. Either both of you will teeter-totter or you won’t. If either of you fails to take your respective seat on each end of the teeter-totter, then there will be no teeter-tottering—just a sad kid sitting motionless on the end of a slanted board.[1]

1 Since the first edition of this book, I’ve confirmed that this qualifies as the most uses of the word teeter-totter in a technical book. That’s a bit of trivia to challenge your friends with.

6.1. Understanding transactions

6.2. Choosing a transaction manager

6.3. Programming transactions in Spring

6.4. Declaring transactions

6.5. Summary

sitemap