internal override Enlistment EnlistDurable(
InternalTransaction tx,
Guid resourceManagerIdentifier,
IEnlistmentNotification enlistmentNotification,
EnlistmentOptions enlistmentOptions,
Transaction atomicTransaction
)
{
Debug.Assert(tx.PromotedTransaction != null, "Promoted state not valid for transaction.");
tx.ThrowIfPromoterTypeIsNotMSDTC();
// Don't hold locks while calling into the promoted tx
Monitor.Exit(tx);
try
{
Enlistment en = new Enlistment(
resourceManagerIdentifier,
tx,
enlistmentNotification,
null,
atomicTransaction
);
EnlistmentState.EnlistmentStatePromoted.EnterState(en.InternalEnlistment);
en.InternalEnlistment.PromotedEnlistment =
tx.PromotedTransaction.EnlistDurable(
resourceManagerIdentifier,
(DurableInternalEnlistment)en.InternalEnlistment,
false,
enlistmentOptions
);
return en;
}
finally
{
Monitor.Enter(tx);
}
}