Created
September 10, 2012 19:30
-
-
Save davybrion/3693225 to your computer and use it in GitHub Desktop.
code snippets for "MSDTC Woes With NServiceBus And NHibernate" post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DummyEnlistmentNotification : IEnlistmentNotification | |
{ | |
public static readonly Guid Id = new Guid("E2D35055-4187-4ff5-82A1-F1F161A008D0"); | |
public void Prepare(PreparingEnlistment preparingEnlistment) | |
{ | |
preparingEnlistment.Prepared(); | |
} | |
public void Commit(Enlistment enlistment) | |
{ | |
enlistment.Done(); | |
} | |
public void Rollback(Enlistment enlistment) | |
{ | |
enlistment.Done(); | |
} | |
public void InDoubt(Enlistment enlistment) | |
{ | |
enlistment.Done(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transaction.Current.EnlistDurable(DummyEnlistmentNotification.Id, new DummyEnlistmentNotification(), | |
EnlistmentOptions.None); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment