When you write a .NET application that requires transactions,
you must consider issues such as lock handling, collision handling,
and transaction isolation.
Interacting with data in a transaction for .NET applications
The API for WebSphere® eXtreme Scale Client requires each thread to have a separate IGridMapPessimisticTx
or IGridMapPessimisticAutoTx object. With the IGridMapPessimisticTx
object, the Transaction property is used to explicitly begin, commit
or roll back the transaction. With the IGridMapPessimisticAutoTx object,
the transaction begin, commit and rollback operations occur automatically.
Use sessions to interact with data, including Add, Put, and Replace
operations.
Configuring and implementing locking in .NET applications
For the backing maps that you are accessing from WebSphere eXtreme Scale Client for .NET, you must define
a pessimistic locking strategy. You can also override the lock timeout
value for a map instance. After you configure locking, you can lock
individual keys or a list of keys in the map.
Implementing exception handling in locking scenarios for .NET 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.