System.Transactions


System.Transactions

The definition of a transaction is "an action or activity involving two parties or things that reciprocally affect or influence each other." In developing software systems, there is regularly the need to have transactional behavior.

The canonical example for a software transaction is that of transferring funds. In that scenario, you are decrementing money from a savings account and crediting money to a checking account. If an issue were to occur sometime after decrementing the money from your savings account but before adding it to your checking account, you would expect the transaction to roll back. Rolling back the transaction would place the funds back in your savings account.

The topic of transactions and transactional messaging is discussed in Chapter 5, "Reliable Sessions, Transactions, and Queues," but before you go to that chapter, it will be helpful to have an understanding of the added functionality around transactions in version 2.0 of the framework, specifically the functionality exposed via System.Transactions.

This next section begins with an overview of how transactions are managed in the .NET Framework, and then discusses how to implement transactions in code.




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