A Simpler TransactionScope

In .Net 3.5 I can write a transactional code block as follows:transacted(()=> { using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); SqlCommand command1 = new SqlCommand(commandString1, connection); command1.ExecuteNonQuery(); SqlCommand command2 = new SqlCommand(commandString2, connection); command2.ExecuteNonQuery(); } }); No need for using and no need to remember to call Complete at the end of the block….

3

Flowing or propagating transactions in .Net

System.Transactions transactions are bounded to the appdomain. Which means that if you make in-appdomain calls from inside a TransactionScope, those calls will share the transaction. This also means that if you need to make a call outside the current appdomain, or outside the process, you will need to “flow” the transaction. To flow a System.Transactions…

5

TIP is now deprecated

TIP is getting deprecated – see the note at http://msdn2.microsoft.com/en-us/library/ms679484(VS.85).aspxIf the native OleTx protocol used by MSDTC and System.Transactions is not friendly enough for your firewall, you should consider the WS-AtomicTransactions protocol provided through Windows Communication Foundation in .Net Framework 3.0 and higher: http://msdn2.microsoft.com/en-us/library/ms730266.aspx


MSDN Magazine Article on Transactional File System

Jason Olson describes the Transactional NTFS and how you can take advantage of it in your applications: http://msdn.microsoft.com/msdnmag/issues/07/07/NTFS/default.aspx


WCF in Romania

These days I’m in Romania with a tour at 3 universities (in Bucharest, Cluj and Iasi) talking about Windows Communication Foundation, distributed systems and web services. Adi Oltean is also talking about storage technologies in Windows. So far the seminars were received really well and we made a lot of friends. I’m really pleased to be able to…

3

"Orcas" March 07 CTP: Support for OASIS WS-AT 1.1 and WS-Coord 1.1

In the “Orcas” March 2007 CTP for Visual Studio and .Net, Windows Communication Foundation brings support for OASIS specifications WS-AtomicTransaction 1.1 and WS-Coordination 1.1. WCF will have side-by-side support with the 1.0 versions of these specs. To use the new version of WS-AT, you can specify the new WS2007HttpBinding, or, if you already use the…

3

Allowing Transactions into Your Component: "Do you really want that?"

Supporting transactions is part of your component contract. If you shipped a component yesterday that exposed MyComp.DoWork to the public, and today you want to add transactional support to your component, you shouldn’t use the same method MyComp.DoWork and make it transactions aware. Not unless you want to break your customers (see http://blogs.msdn.com/florinlazar/archive/2005/04/19/409834.aspx for details on…

4

Supporting Promotable Transactions and Phase 0

If you are providing support for promotable transactions for your resource manager using PSPE then you need to remember to “support” Phase 0. In general, a resource manager doesn’t need to do anything special about Phase 0; this phase will be handled solely by the transaction manager. But, because in the case of promotable transactions using…

1

When transaction promotion goes "bad"

We already know the benefits of promotable transactions. They are all about performance, being very fast and lightweight. But then you get into situations where you know for sure that you are going to talk to a second resource manager, so you know you will get to a distributed transaction anyway. Or, the resource managers…

4

Comments for 90 days only

I’m getting way too much spam these days. I wanted to keep the comments open for ever so I can get your feedback at any time you wanted to send it to me. Unfortunately spam is consuming my time so I decided to limit the lifetime for comments to 90 days starting from the day…