O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

B.10. Use Distributed Transactions Only If You Need Them

It's very easy to use distributed transactions (also known as Enterprise Services, COM+, and DTC transactions) within a Web method. Simply set the WebMethod-Attribute's TransactionOption property to RequiresNew and you're set. This is another example of “just because you can doesn't mean you should.” Please understand that distributed transactions are designed for specific scenarios and are not intended to replace TSQL or ADO.NET transactions. Each has its role and the scenarios where each makes sense. See Chapter 6 for a discussion of when distributed transactions make sense and a link to an MSDN article that compares the performance of the three transaction control mechanisms.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required