Enterprise Transaction Services—Automatic Transactions


Jump to: navigation, search
CSharp-Online.NET:Articles
.NET Articles

Enterprise Transaction Services

© 2005 Pearson Education, Inc.

Automatic Transactions

With automatic transactions, you do not have to pass a transaction as an argument of a method; instead, a transaction flows automatically with the context. Using transaction attributes, you can specify whether a transaction is needed.

Using the class attribute [Transaction], you can specify whether objects of the class are aware of transactions, and whether transactions should be created automatically by the Enterprise Services runtime.

The class attribute is applied to the class of the serviced component, as shown in this code segment:

[Transaction(TransactionOption.Required)]
public class CustomerDataComponent : ServicedComponent
{


Previous_Page_.gif Next_Page_.gif


Personal tools