Transactions offer the functionality to group multiple work units into one big unit of work, but you can further configure Hibernate to achieve better isolation in a concurrent environment. What defines concurrency parameters is transaction isolation levels as well as locking mechanisms. These concepts also require that you learn the capabilities and the behavior of the specific RDBMS that you are using because both of them are implemented by the database systems and are not Hibernate features. For this reason, you need to carefully explore the various options with your specific database system. Here, we will discuss them to show you how to control them through Hibernate.
Lastly, when dealing with concurrency issues, you'll also need to keep in mind the first-level and second-level cache, as they can play an important role in identifying problems. We discussed this topic in Chapter 5, Hibernate Cache.