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.