
// $Id: JBCACHE-32.txt 2073 2006-06-19 12:33:28Z  $

SOLUTION for "Transaction already associated bug"

PREPARE:
--------
- If no LTX exists for GTX
      - Create new LTX-NEW, associate with GTX
      - If LTX-OLD exists: suspend it
      - Resume LTX-NEW (associates with ThreadLocal)
      - Execute method calls
      - Suspend LTX-NEW (disassociates with ThreadLocal)
      - Resume LTX-OLD (if exists)

- If LTX associated with GTX
      - Suspend old LTX-OLD
      - Resume LTX (associates with ThreadLocal)
      - Execute method calls
      - Suspend LTX (disassociates with ThreadLocal)
      - Resume LTX-OLD


COMMIT/ROLLBACK:
----------------
- Find LTX associated with GTX
- Suspend LTX-OLD (if exists)
- Resume LTX (associates with ThreadLocal)
- Commit or rollback
- Suspend LTX (disassociates with ThreadLocal)
- Resume LTX-OLD (if exists)