Transaction Managers


Version 2.0 of the framework introduced two new transaction managers: the Lightweight Transaction Manager and the OleTx Transaction Manager.

The Lightweight Transaction Manager (LTM) is a two-phase commit coordinator that provides transaction management within a single app domain. It is used for scenarios in which there is only a single durable resource involved, and there is no requirement for the Transaction Manager to log. This offers the capability to incorporate transaction management into an application without Microsoft Distributed Transaction Coordinator (DTC) and the overhead associated with it.

The OleTx Transaction Manager can handle those scenarios not handled by the LTM. The OleTx Transaction Manager is used for transactions that involve more than one durable resource, or span beyond a single app domain.

As a developer, you will not interact with the transaction managers directly, but instead through the objects in the System.Transactions namespace. One of the key benefits of this approach is the capability to support transaction promotion.

By default, every System.Transactions transaction begins utilizing the Lightweight Transaction Manager. If there comes a point in the scope of the transaction where it involves a second durable resource, that is, a second database connection, or crosses the app domain boundary, it is promoted and enlisted in a new OleTx transaction. This lets you, as a developer, focus on writing transactions, and lets the .NET framework use the best manager for a given scenario.




Presenting Microsoft Communication Foundation. Hands-on.
Microsoft Windows Communication Foundation: Hands-on
ISBN: 0672328771
EAN: 2147483647
Year: 2006
Pages: 132

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net