views:

153

answers:

1

I need to carry out some database updates, part of which will go through a COM+ component (that will be enabled for transactions), and others through standard LINQ to SQL, and I want both updates to part of one transaction.

I intend to use a TransactionScope to allow .NET and COM+ transactions to synchronise. However having read the documentation regarding EnterpriseServicesInteropOption, I am still uncertain of the differences between Automatic and Full.

Can I use Automatic in my case?

I can sense I may get a RTFM response, but I found this article unclear: http://msdn.microsoft.com/en-us/library/ms229974(VS.80).aspx

Any clearer resources people have would also be appreciated

+1  A: 

The difference is that Full will always create a COM+ transaction context, and Automatic will create one when needed.
So, in a case that a COM+ Transac is needed, the primary difference is when the app take the performance hit, at the beginning of the transac (with Full), or in the moment is needed (with Automatic)

If you are certain that you will need a COM+ transaction, go for Full, but ... don't believe me:
Test! a lot!!

Eduardo Molteni
Automatic's ability to create 'when needed' is part of what is not clear to me though. Are you saying this will be as soon as I call my COM+ object? Will .NET notice this is a Transaction-enabled COM+ object, and that there is an active transaction, and say "Ah! An EntepriseServices Transaction is needed now", or will the actual method I'm calling in the COM+ object need to create its own transaction, for it to realise a shared transaction is needed for both.
MattH
AFAIK, If the COM+ object is marked as a Need or Use Existing Transaction will create the transaction as soon as you call the object. Don't know the exact timing, but, as I tell you, test it for yourself
Eduardo Molteni
OK, thanks :)I will of course test it, but unfortunately the COM+ component has not yet been delivered, hence my being finicky.
MattH