all groups > dotnet component services > may 2004 >
You're in the

dotnet component services

group:

2 COM+ componants that participate in the same distributed transaction


2 COM+ componants that participate in the same distributed transaction Krichene Neila via .NET 247
5/12/2004 9:56:46 PM
dotnet component services:
Hello every body
I have two differents COM+ componants inheriting from rhe servicedcomponent class with ActivationOption = server.

The first server COM+ compoent updates a database "Bank1"
the second server Com+ component updates a second database named "Bank2"

The two components are set with the attribute [ Transaction.required]

I want that the two components participate in the same distributed transaction. I have tried to create an instance of the second component within a method of the first compoent like this:

example
transactionoption.required
pucblic class Comp1:servicedcomponent {
public method 1

{Com2 Kom2 = new Com2()
Kom2.Enregistrer();}

But this generates an exception because the first component fails to create the instance of the second one .

Can someone help me , tell me why it doesn't work or give me a solution??
Thanks

--------------------------------
From: Krichene Neila

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

Re: 2 COM+ componants that participate in the same distributed transaction Florin Lazar [MSFT]
5/29/2004 1:15:06 AM
Hi Krichene,

What exception do you get when the creation fails?

Regards,
--
Florin Lazar - Microsoft - [ http://blogs.msdn.com/florinlazar ]
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]
transaction. I have tried to create an instance of the second component
within a method of the first compoent like this:
[quoted text, click to view]

AddThis Social Bookmark Button