Chapter 19. Transactions
19.1. About Java Transaction API Transactions
JBoss Data Grid supports configuring, use of and participation in JTA compliant transactions. However, disabling transaction support is the equivalent of using the automatic commit feature in JDBC calls, where modifications are potentially replicated after every change, if replication is enabled.
JBoss Data Grid does the following for each cache operation:
- First, it retrieves the transactions currently associated with the thread.
- If not already done, it registers
XAResource
with the transaction manager to receive notifications when a transaction is committed or rolled back.
Important
With JBoss Data Grid 6.0.x, it is recommended to disable transactions in Remote Client-Server Mode. However, if an error displays warning of an
ExceptionTimeout
where JBoss Data Grid is Unable to acquire lock after {time} on key {key} for requester {thread}
, enable transactions. This occurs because non-transactional caches acquire locks on each node they write on. Using transactions prevents deadlocks because caches acquire locks on a single node. This problem is resolved in JBoss Data Grid 6.1.