From: Steve B. <ba...@te...> - 2002-03-03 18:07:57
|
I prefer to have the pessimistic locking supported at load time -- either by the query language or through the persistence API for loading objects. Allowing explicit lock upgrades after loading would be nice for flexibility, but it also can lead to deadlocks in the database if multiple objects are being loaded and modified in a transaction. It's also effectively optimistic locking since the data initially read may have changed between the time you load the object and the time you upgrade the lock. Steve |