Distributed Transactions without the Distributed part

There is a new feature in the Whidbey release of the .NET Framework that I have found very interesting involving transactions.  There is a new namespace called System.Transactions.  This namespace provides support for distributed transactions without necessarily using the DTC and COM+.  The basic idea is that in some business logic, through the use of conditions, there may be a distributed transaction created which does not really need to be a distributed transaction.  In this case, because of conditions within the business logic only one resource manager is used.  By using the System.Transactions namespace, the business logic will only use a local transaction when only one resource manager is needed.  When a second resource manager is used within the scope of the transaction, the transaction scope is escalated to use the DTC.  This is a very interesting concept.  I would like to thank Pablo Castro @ Microsoft for taking the time to explain how this works and giving me some sample code.  I will be blogging with some sample code in the near future along with some tests to see how well it works (don't worry, I am not going to put up any performance analysis stuff and violate some condition in a license somewhere).  I would have already gone through all this, but those danged customers keep getting in the way.

Wally

No Comments