}
Transaction transaction = TransactionCoordination.getInstance().getTransaction();
if (transaction == null)
{
throw new IllegalTransactionStateException(CoreMessages.noMuleTransactionAvailable());
}
if (!(transaction instanceof XaTransaction))
{
throw new IllegalTransactionStateException(CoreMessages.notMuleXaTransaction(transaction));
}
synchronized (enlistedXAResourceLock)
{
if (!isEnlisted())