private void TryCompletePromotedTransaction(Guid txId)
{
CommittableTransaction transaction;
if (!promotedTransactions.TryRemove(txId, out transaction))
return;
System.Threading.Tasks.Task.Factory.FromAsync(transaction.BeginCommit, transaction.EndCommit, null)
.ContinueWith(task =>
{
if (task.Exception != null)
log.WarnException("Could not commit dtc transaction", task.Exception);
try
{
transaction.Dispose();
}
catch (Exception e)
{
log.WarnException("Could not dispose of dtc transaction", e);
}
});
}