Skip Headers

# Pessimistic Locking Query

Previous

Next

When you use pessimistic locking (`ObjectLevelReadQuery` methods `acquireLocks` or `acquireLocksWithoutWaiting` or `Session` method `refreshAndLockObject`), TopLink does the following:

- Allocates a write connection used for both read and write operations.

- Always reads from the database.

- Always updates the cache with the database version.