Chapter 9. EJB Transactions: The Atomic Age
Transactions protect you. With transactions, you can take a risk. You can try something BIG, knowing that if anything goes wrong along the way, you can just pretend the whole thing didn’t happen. Everything goes back to the way it was before. The idea is simple—you either commit to everything in the transaction, or you rollback, so that nobody sees what you were trying (but failed) to do. Transactions in EJB are a thing of beauty—you can deploy a bean with customized transaction behavior without touching the bean’s source code! But you can write transaction code, if you need to, so we’ll learn that too.
Get Head First EJB 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.