- They're different so it's difficult to say. If you need ACID transactions, use transactions. That's what they're there for
- Distributed locks are independent of caches. Transactions can work across multiple caches
- When using transactions, you have full two-phase commits, meaning that writes are either committed (or not) to both Ignite and the underlying database
Note, I'm assuming you mean Ignite#reentrantLock()
when you say "distributed locks." There's also IgniteCache#lock()
, but that only for a single record and typically isn't what's required.