Q: Rethrowing an exception causes my data to not save I have this code:
catch (Exception e)
{
    try
    {
        transmitModel.AddAck(transmitBatchId,
          "<error><message>" + e.Message + "</message><stack>" + e.StackTrace +
          "</stack><Location>FromLisAtOMServer<Location>" +
          "<TransmitBatchId>" + message.TransmitBatchId +
          "</TransmitBatchId></error>", false, true);
    }
    // If we fail to log, we don't want that to bubble up... 
    // We want the real error to do that.
    catch (Exception){}

    // Re-throw the exception so that the service bus will 
    // move this off to the error queue.);
    throw;
}

The AddAck method will save that string to the database (Using Entity Framework).
When I run this without the last statement throw, it saves my error message to database fine.
When I have the throw; in there, it says it saves  but when I query the database it is not in there.  I can even run a entity query via my data context right after saving (in the code) and it returns the value as if it is saved (though that may be using a cached version).  But if I go and query afterwards the data is not there....
I have checked to be sure that no other logic is causing the value to be removed on an exception.
Any ideas what could be causing this?

A: OK, post as an answer here, it comes in my mind very easily as I used to met the same issue, and figured out it was just caused I didn't commit the DB transaction.
Thanks, :)

A: This call is as a result of an NServiceBus message.
I forgot that my NServiceBus stuff runs in a distributed transaction.  So when I threw the exception it roll back all my pending changes.
I need to find out how to get this log file to post outside the transaction...

A: It is possible that NServiceBus provides hooks for this kind of thing.
Your problem is quite possibly what you have stated: the message handling has to happen in a transaction.  You cannot commit that else you are also committing errors.  So you definitely have to find out where you can hook into the post message handling exception processing.
With Shuttle ESB (http://shuttle.codeplex.com/) we use pipelines for handling different use cases and you can hook into the PipelineException event that is raised by the various pipelines.  Shuttle has a the ability for developers to add modules that hook into the various events.  There is already a SystemExceptionModule that does more-or-less what you want to do.
