Implement dtc in .net, DOT NET Programming

How to implement DTC in .NET

DTC is implemented using the COM+.

Following are some of the steps to implement COM + in .NET:-

1) The "EnterpriseService" namespace has all the classes by which we can implement the DTC in .NET. You have to add reference "EnterpriseService" namespace.

692_implement DTC in .NET.png

2) You must derive your class from "Serviced Component" object.

3) After that you have to define your class with the transaction attribute 

      [ Transaction(TransactionOption.RequiresNew) ]

4) When the class level transaction type is defined.  Now its  time to define at the method level the AutoComplete attribute. Autocomplete attribute explains that if no exception is thrown then mark its part of the transaction as okay. This helps to cut down on the amount of code required. If the implementation sets AutoComplete to false, or omits it altogether, then we would require to manage the transaction manually. For manually control the transaction you will require to use the ContextUtil class & its static members.


public void SampleFunction()




// Do something to a database

// ...

// Everything okay so far Commit the transaction





// Something went wrong Abort and Rollback the Transaction.





5)The Component which is  derived from "ServicedComponent" must  be strong named as they run under COM+.

6)Once the classes are compiled using the string name.Register the Component in COM+ services using

 regsvcs c:\DllPath\TransactionComponent.dll

7)The component is registered by using the COM+ explorer.

Posted Date: 9/21/2012 7:29:39 AM | Location : United States

Related Discussions:- Implement dtc in .net, Assignment Help, Ask Question on Implement dtc in .net, Get Answer, Expert's Help, Implement dtc in .net Discussions

Write discussion on Implement dtc in .net
Your posts are moderated
Related Questions
A Super-hero SharePoint developer with great design skills Project Description: US: Our start-up company prepares a very innovative and cool SharePoint related product with c

What is an object? They are instance of classes. It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Attributes and behavior of

Project Description: It is online portal for hotel n packages sales. The project requires to be built on sql, Jquery and c#. The project should be submitted with all coding a

can we use sql data base with visual studio

How can we identify that the Page is PostBack? The Page object has the "IsPostBack" property which can be checked to know that the page is posted back.

I need Isometric Exploration Tablet Game I am endeavoring to build an 2D tile-based isometric game, primarily for Android and iOS tablet devices. It will be built in Unity 3d v4

We have a VB.NET application to organize the edition and creation of dynamic PDF forms (fishing trip logsheet). The fishing vessel parameters are entered once for good in this VB.N

having trouble programming