return transactions.get();
}
public void unbindTransaction(final Transaction transaction) throws TransactionException
{
Transaction oldTx = transactions.get();
if (oldTx instanceof TransactionCollection)
{
// if there are more in-flight aggregated transactions, do nothing yet
if (!((TransactionCollection) oldTx).getTxCollection().isEmpty())
{
return;
}
}
try
{
if (oldTx != null && !oldTx.equals(transaction))
{
throw new IllegalTransactionStateException(CoreMessages.transactionCannotUnbind());
}
}
finally