TransactionScope: Has it gotten better?

前端 未结 3 551
感情败类
感情败类 2020-12-11 19:53

When TransactionScope first came out, I ran into some serious issues getting it to work between my dev machine (XP) and our database server (Windows Server 2003).

Wh

3条回答
  •  执念已碎
    2020-12-11 20:33

    I have been using TransactionScope for over a year now without any issues. However, the application is an internal application with a very small number of users. Also, the database and application reside on the same server.

    Here is some information on TransactionScope and where to look for more information: Whenever you create a TransactionScope object it starts a lightweight transaction. Then as long as you use a single connection/resource that supports lightweight transactions, the transaction will be handled by the resource manager consuming as little resources as possible with very good performance. When you add a second connection/resource into the transaction scope the transaction manager will automatically be promoted to an OleTx Transaction Manager, which can handle distributed transactions by using the COM+ DTC technologies. This will also happen with a single connection to a resource manager that doesn't support lightweight transactions such as SQL Server 7/2000, Oracle and other RDBMSs.

    Here are two resources that may be able to help you out:

    "Microsoft Windows Server 2003 Service Pack 1 (SP1) and Microsoft Windows XP Service Pack 2 (SP2) include many security-related updates and changes. Some of these changes affect the Microsoft Distributed Transaction Coordinator (MSDTC) service." New functionality in the Distributed Transaction Coordinator service in Windows Server 2003 Service Pack 1 and in Windows XP Service Pack 2

    and

    Juval Lowy's whitepaper on System.Transactions: Introducing System.Transactions in the Microsoft .NET Framework version 2.0

提交回复
热议问题