// If we don't do this, we leak the tx and gtx in txTable.
// BES -- I'm using the transactions map here as a proxy for whether
// the tx has had a synchronization registered. Not really ideal...
if (transactions.get(ctx.getTransaction()) == null)
{
GlobalTransaction gtx = txTable.remove(ctx.getTransaction());
if (gtx != null) txTable.remove(gtx);
}
suspendedTransaction = txManager.suspend();
// set the tx in the invocation context to null now! - JBCACHE-785