Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ayende committed Apr 4, 2010
1 parent cf7efea commit 0137e04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Rhino.ServiceBus/Msmq/MsmqTransport.cs
Expand Up @@ -172,13 +172,14 @@ public OpenedQueue CreateQueue()
return Endpoint.InitalizeQueue();
}

private void HandleMessageCompletion(
private static void HandleMessageCompletion(
Message message,
TransactionScope tx,
OpenedQueue messageQueue,
Exception exception,
Action<CurrentMessageInformation, Exception> messageCompleted,
Action<CurrentMessageInformation> beforeTransactionCommit)
Action<CurrentMessageInformation> beforeTransactionCommit,
ILog logger, Action<CurrentMessageInformation, Exception> messageProcessingFailure)
{
var txDisposed = false;
if (exception == null)
Expand Down Expand Up @@ -238,9 +239,8 @@ public OpenedQueue CreateQueue()

try
{
var copy = MessageProcessingFailure;
if (copy != null)
copy(currentMessageInformation, exception);
if (messageProcessingFailure != null)
messageProcessingFailure(currentMessageInformation, exception);
}
catch (Exception moduleException)
{
Expand Down Expand Up @@ -291,7 +291,7 @@ public OpenedQueue CreateQueue()
}
finally
{
HandleMessageCompletion(message, tx, messageQueue, ex, messageCompleted, beforeMessageTransactionCommit);
HandleMessageCompletion(message, tx, messageQueue, ex, messageCompleted, beforeMessageTransactionCommit, logger, MessageProcessingFailure);
currentMessageInformation = null;
}

Expand Down

0 comments on commit 0137e04

Please sign in to comment.