private void EnsureEnlistment()
{
AssertNotDisposedOrDisposing();
if (Transaction.Current == null)
throw new InvalidOperationException("You must use TransactionScope when using Rhino.Queues");
if (CurrentlyEnslistedTransaction == Transaction.Current)
return;
// need to change the enlistment
Interlocked.Increment(ref currentlyInsideTransaction);
Enlistment = new TransactionEnlistment(queueStorage, OnTransactionComplete, AssertNotDisposed);
CurrentlyEnslistedTransaction = Transaction.Current;
}