Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a confused problem about COM+ Transaction (C# Language)

Status
Not open for further replies.

darlingpretty

Programmer
May 13, 2004
2
CN
Hi Every:
I have a confused problem about COM+ Transaction.
I have a Componennt A that new transaction required and Component B that transaction supported.
Both ComponentA and ComponentB is transactional, pooled and JIT Activation.

whether I need call Compoent B's method by creating a new Component B using new operator in Component A or not.

Coding Example:

ComponentB b = null;
[AutoComplete]
ComponentA::DoIt()
{
b = new ComponentB();
b.Dosomething();
b = new ComponentB();
b.DosomthingElse();
}

ComponentB b = null;
[AutoComplete]
ComponentA::DoIt()
{
if( b == null) ComponentB b = new ComponentB();
b.Dosomething();
b.DosomthingElse();
}

which is right? If the latter is right, I wonder if ComponentA's transaction ID could transfer to ComponentB correctly.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top