internal override void EnterState(InternalTransaction tx)
{
CommonEnterState(tx);
ChangeStatePromotedAborted(tx);
// If we have a volatilePreparingEnlistment tell it to roll back.
if (tx._phase0Volatiles.VolatileDemux._preparingEnlistment != null)
{
Monitor.Exit(tx);
try
{
// Tell the distributed TM that the tx aborted.
tx._phase0Volatiles.VolatileDemux._promotedEnlistment.ForceRollback();
}
finally
{
Monitor.Enter(tx);
}
}
else
{
// Otherwise make sure that the transaction rolls back.
tx.PromotedTransaction.Rollback();
}
}