Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How to implement DTC in .NET
How to implement DTC in .NET ?
✍: Guest
DTC is implemented using COM+.
Following are the steps to implement COM + in .NET :-
ã gEnterpriseServiceh namespace has all the classes by which we can implement DTC
in .NET. You have to add reference gEnterpriseServiceh namespace.
omits it all together, then we would need to manage the transaction manually. To
manually control the transaction you will need to use the ContextUtil class and its static
members. Following is small snippet of ContextUtil: -
public void SampleFunction() { try { // Do something to a database // ... // Everything okay so far Commit the transaction ContextUtil.SetComplete(); } catch(Exception) { // Something went wrong Abort and Rollback the Transaction. ContextUtil.SetAbort(); } }
ã Component derived from gServicedComponenth should be strong named as they
run under COM+.
ã Once the classes are compiled using the string name.Register the Component in COM+
services using
regsvcs c:\DllPath\TransactionComponent.dll
ã You can see that the component is registered using the COM+ explorer.
2007-10-22, 5335👍, 0💬
Popular Posts:
Can we get a strongly typed resource class rather than using resource manager? In the previous quest...
What will be printed as the result of the operation below: main() { char *p1; char *p2; p1=(char *)m...
Once I have developed the COM wrapper do I have to still register the COM in registry? Yes.
How Can we change priority & what levels of priority are provided by Dot Net? Thread Priority ca...
What does a special set of tags <?= and ?> do in a PHP script page? <?= express...