Why Transactions Are Important
When you write a database application, you often take transactions for granted. Transactions are an integral part of database applications, although in simple applications you might not notice transactions taking place because your database connection can be automatically committing the transactions without your knowledge.
A transaction lets you group a set of operations into an all-or-nothing operation. In other words, either the operations all succeed or they all fail. Going back to the example in Chapter 5, "Overview of Enterprise JavaBeans," imagine that you're using an automatic teller machine. The dispensing of the cash and the debiting of your account should be accomplished as a single transaction. You don't ...
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.
Read now
Unlock full access