Using Field Locking Policies

The following locking policies, included in TopLink, do not require any additional fields:

All these policies compare the current values of certain mapped previous values. When using these policies, a UnitOfWork must be employed for updating the database. Each policy handles its field comparisons in specific way, as defined by the policy.

Whenever any update fails because optimistic locking has been violated, an OptimisticLockException is thrown. This should be handled by the application when performing any database modification The application must refresh the object and reapply its changes.


Related Topics

About TopLink Descriptors

Using Version Locking Policies
Specifying Advanced Optimistic Locking Policies

Working with Optimistic Locking
Working with Descriptors

 

Copyright © 1997, 2004, Oracle. All rights reserved.