|
I see. This is scope is only active for tx states STATUS_ACTIVE, STATUS_MARKED_ROLLBACK, STATUS_PREPARED, STATUS_UNKNOWN, STATUS_PREPARING, STATUS_COMMITTING and STATUS_ROLLING_BACK (JTA 1.2 spec, section 3.8). However, ThreadLocal might not work either - CDI is using a JTA Synchronization callback and AFAIK there is no guarantee the callback will be invoked in the same thread (although it could work in most cases). What about TransactionSynchronizationRegistry?
|