My vote goes to using System.Transactions in the 2.0 framework as the best
choice.
http://blogs.msdn.com/angelsb/archive/category/6274.aspx
If you want to use v1.1 then I would vote for ServiceConfig.
http://blogs.msdn.com/florinlazar/archive/2004/07/24/194199.aspx
The only downside of ServiceConfig is that it requires Windows2003 or WinXp
service pack 2, other than that it is a very clean way of dealing with
distributed transactions, no strong name signing or using attributes. Here
is some code:
ServiceConfig config = new ServiceConfig();
config.Transaction = TransactionOption.Required;
ServiceDomain.Enter(config);
try
{
MyTxCode(); //SqlConnections will autoenlist on tx here
}
catch(Exception e)
{
// we got an exception
Console.WriteLine(e.Message);
// so, we should abort the transaction
ContextUtil.SetAbort();
}
finally
{
ServiceDomain.Leave();
}
--
Angel Saenz-Badillos [MS] Managed Providers
This posting is provided "AS IS", with no warranties, and confers no
rights.Please do not send email directly to this alias.
This alias is for newsgroup purposes only.
I am now blogging about ADO.NET:
http://weblogs.asp.net/angelsb/
Two things I can think right off the bat -
a) Deployment is a pain.
b) Deploying newer versions is stricter (without a public key, you
can
simply swap the dll, as long as signatures don't change, but with a strong
key oooh good luck !!)
c) Newer versions are simply overwrite the file, with GAC u gotta do
a
publisher policy, or two versions end up in the GAC.
Wait that's 3 downsides LOL
- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
What's wrong with strong names and GAC (apart from registration)?
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
SLODUG - Slovene Developer Users Group
www.codezone-si.info
1) ADO.NET Transactions: Good for local transactions to a single
database
2) EntServices (COM+) Transactions: Good for distributed transactions,
but
costly for local transactions. Plus the GAC, plus strong names, plus
COM+
overhead.
--John Papa
http://codebetter.com/blogs/john.papa
:
I am debating which route to take for Declarative Trans
Application. ADO.NET or ES (COM+). What do i gain by going
the ADO.NET rounte and cetainly at what cost?
Thank you