Working with Optimistic Locking

When using caching to provide performance benefits, you should also use a locking policy to manage database record modification in multiuser environments. Without a locking policy, it may be possible for users to see data that is no longer valid (sometimes called stale data) stored in the cache.

Databases typically support the following locking policies:

Oracle recommends using optimistic locking to ensure that all users are working with valid data before committing changes. TopLink supports multiple locking policies for optimistic locking:


Related Topics

About TopLink Descriptors

Using Version Locking Policies
Using Field Locking Policies
Specifying Advanced Optimistic Locking Policies

Working with Descriptors

 

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