Locks have life cycles and different types of locks are
compatible with others in various ways. Locks must be handled in the
correct order to avoid deadlock scenarios.
Implementing exception handling in locking scenarios for Java applications
To prevent locks from being held for excessive amounts of time when
a LockTimeoutException exception or a LockDeadlockException exception
occurs, your application must catch unexpected exceptions and call
the rollback method when an unexpected event occurs.
Example: flush method lock ordering
Invoking the flush method on the ObjectMap interface before a commit can introduce additional
lock ordering considerations. The flush method
is typically used to force changes that are made to the map out to
the backend through the Loader plug-in.
Java examples for transaction isolation
Transaction isolation defines how the changes that are
made by one operation become visible to other concurrent operations.
You can use the following examples to define the transaction isolation
level in your Java application.