Chapter 10. Transactions and concurrency

In this chapter, we finally talk about transactions and how you create and control units of work in a application. We'll show you how transactions work at the lowest level (the database) and how you work with transactions in an application that is based on native Hibernate, on Java Persistence, and with or without Enterprise JavaBeans.

Transactions allow you to set the boundaries of a unit of work: an atomic group of operations. They also help you isolate one unit of work from another unit of work in a multiuser application. We talk about concurrency and how you can control concurrent data access in your application with pessimistic and optimistic strategies.

Finally, we look at nontransactional data access and when you should work with your database in autocommit mode.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset