StatefulHolderThreadLocal threadLocal = statefulHolderTransactionMap.get(currentTxGtrid);
if (threadLocal == null) {
// This is the first time this TxGtrid/ThreadLocal is going into the map,
// register interest in synchronization so we can remove it at commit/rollback
try {
transaction.registerSynchronization(new SharedStatefulHolderCleanupSynchronization(currentTxGtrid));
} catch (Exception e) {
// OK, forget it. The transaction is either rollback only or already finished.
return;
}