Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.6.3
-
None
-
None
-
JDK 7, JTA 1.1
Description
When JTA is used, locking is performed inside the transaction the session is registered in. This makes locks visible only after transaction is commited and session-scoped locks are useless.
Steps to reproduce:
1. Add a node.
1. Begin transaction.
2. Create lock for node.
3. Suspend transaction.
4. Begin new transaction.
5. Check for lock on node.
Expected: node is locked.
Actual result: node is not locked until first transaction is commited. If session-scoped lock is used, node will never be locked.
Workaround that simulates session scoped lock:
1. Suspend current transaction.
2. Begin new transaction.
3. Create lock.
4. Commit.
5. Resume suspended transaction.
6. Assign lock to resumed transaction.
7. Register Synchronization to release lock before transaction is finished.