[hibernate-dev] JPA2 locking
emmanuel at hibernate.org
Tue Oct 20 11:52:06 EDT 2009
On 20 oct. 09, at 17:16, Scott Marlow wrote:
> In our JPA 1 support, LockModeType of READ is implemented with
> LockMode.UPGRADE (pessimistic lock is obtained). With the above
> proposal, this would change in our JPA 2 implementation to use an
> optimistic lock (just read version at load time and validate that
> version didn't change at commit time).
> In our JPA 1 support, LockModeType of WRITE is implemented with
> LockMode.FORCE (pessimistic lock is obtained with version
> incremented). With the above proposal, this would change in our JPA
> 2 implementation to use same as OPTIMISTIC_FORCE_INCREMENT above.
Correct, we were overly secure and we need to document the behavioral
change of our impl.
More information about the hibernate-dev