O'Reilly logo

Seam Framework: Experience the Evolution of Java™ EE, Second Edition by Thomas Heute, Jacob Orshalick, Michael Juntao Yuan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

11 Transactions and Persistence

Transactions are an essential feature for database-driven web applications. In each conversation, we typically need to update multiple database tables. If an error occurs in the database operation (e.g., a database server crashes), the application needs to inform the user, and all the updates this conversation has written into the database must be rolled back to avoid partially updated (i.e., corrupted) records. In other words, all database updates in a conversation must happen inside an atomic operation. Transactions enable you to do exactly that.

In a Seam application, we typically assemble and modify database entity objects throughout a conversation. At the end of the conversation, we commit ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required