Java Reference
In-Depth Information
O/R mapping. In a JDO application, you use pessimistic locking by setting a Per-
sistenceManagerFactory property; in a Hibernate application, you use pessimistic
locking by calling a method when loading an object or executing a query.
The Spring framework has some useful features for signaling and handling
concurrency failures. It defines a data access exception hierarchy that hides the
mechanism used to access a database. Spring's data access classes automatically
map Hibernate, JDO , and JDBC exceptions to Spring data access exceptions,
which enables the application to treat them uniformly. An application can use a
custom Spring AOP interceptor to automatically retry a transaction that is rolled
back because of a database concurrency error.
Handling concurrent updates within a single transaction is only one of the
database concurrency problems we need to solve. We must also handle concur-
rent updates across a sequence of database transactions. The next, and final,
chapter shows you how to do that.
Search WWH ::




Custom Search