When you write a Java™ application that requires transactions, you must consider issues
such as lock handling, collision handling, and transaction isolation.
Developing applications that update multiple partitions in a single transaction
If your data is distributed across multiple
partitions in the data grid, you can read and update several partitions
in a single transaction. This type of transaction is called a multi-partition
transaction and uses the two-phase commit protocol to coordinate and
recover the transaction in case of failure.
Using locking
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.