PC Review


Reply
Thread Tools Rate Thread

ADO.NET or Enterprise Services (ES)

 
 
lottoman2000
Guest
Posts: n/a
 
      7th Apr 2005
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
 
Reply With Quote
 
 
 
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      7th Apr 2005
ADO.NET gets my vote.

Here are the reasons -

ES - means GAC - means strongly named - pain in the butt.
ADO.NET gives you the option of creating distri trans at database level.
Managing those transactions without involving MSDTC is a better idea, if
both RMs are going to be databases.

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/



"lottoman2000" <(E-Mail Removed)> wrote in message
news:12a301c53bb3$927d09e0$(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?Sm9obiBQYXBh?=
Guest
Posts: n/a
 
      7th Apr 2005
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


"lottoman2000" wrote:

> 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
>

 
Reply With Quote
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      7th Apr 2005
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

"John Papa" <(E-Mail Removed)> wrote in message
news:9600F50B-920F-4317-B446-(E-Mail Removed)...
> 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
>
>
> "lottoman2000" wrote:
>
>> 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
>>



 
Reply With Quote
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      7th Apr 2005
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
news:ub$(E-Mail Removed)...
> 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
>
> "John Papa" <(E-Mail Removed)> wrote in message
> news:9600F50B-920F-4317-B446-(E-Mail Removed)...
> > 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
> >
> >
> > "lottoman2000" wrote:
> >
> >> 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
> >>

>
>



 
Reply With Quote
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      7th Apr 2005
I wanna add.

Even if you wanna do distributed transactions with ADO.NET in 1.1, you can
still do them at the database level using linked servers, or BEGIN
DISTRIBUTED TRANSACTION.

It's just not as elegant as 2.0, but it's sure better than involving MSDTC.

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/



"John Papa" <(E-Mail Removed)> wrote in message
news:9600F50B-920F-4317-B446-(E-Mail Removed)...
> 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
>
>
> "lottoman2000" wrote:
>
> > 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
> >



 
Reply With Quote
 
Angel Saenz-Badillos[MS]
Guest
Posts: n/a
 
      8th Apr 2005
My vote goes to using System.Transactions in the 2.0 framework as the best
choice.
http://blogs.msdn.com/angelsb/archiv...gory/6274.aspx

If you want to use v1.1 then I would vote for ServiceConfig.
http://blogs.msdn.com/florinlazar/ar...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/




"Sahil Malik [MVP]" <(E-Mail Removed)> wrote in message
news:O3$(E-Mail Removed)...
> 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
> news:ub$(E-Mail Removed)...
> > 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
> >
> > "John Papa" <(E-Mail Removed)> wrote in message
> > news:9600F50B-920F-4317-B446-(E-Mail Removed)...
> > > 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
> > >
> > >
> > > "lottoman2000" wrote:
> > >
> > >> 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
> > >>

> >
> >

>
>



 
Reply With Quote
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      8th Apr 2005
Angel,

Even when a distributed transaction can be contained using transactions at
the database level ... do you still recommend using Syst.Tran?
Why so? I thought MSDTC was evil. (We're talking 2 databases, not one).

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/



"Angel Saenz-Badillos[MS]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> My vote goes to using System.Transactions in the 2.0 framework as the best
> choice.
> http://blogs.msdn.com/angelsb/archiv...gory/6274.aspx
>
> If you want to use v1.1 then I would vote for ServiceConfig.
> http://blogs.msdn.com/florinlazar/ar...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/
>
>
>
>
> "Sahil Malik [MVP]" <(E-Mail Removed)> wrote in message
> news:O3$(E-Mail Removed)...
> > 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
> > news:ub$(E-Mail Removed)...
> > > 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
> > >
> > > "John Papa" <(E-Mail Removed)> wrote in message
> > > news:9600F50B-920F-4317-B446-(E-Mail Removed)...
> > > > 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
> > > >
> > > >
> > > > "lottoman2000" wrote:
> > > >
> > > >> 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
> > > >>
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Angel Saenz-Badillos[MS]
Guest
Posts: n/a
 
      9th Apr 2005
Must have slept through the thread, I thought that he was asking about
scenarios where a single transaction will not work so no way to use
transactions at database level. If the question is whether to use dtc or
local transactions then definitelly use local transactions and preferably in
the stored proc level.

If on the other hand you need to use two connections I would use
System.Transactions rather than sp_bindsession. Against two different
servers again dtc is hard to beat.

--
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/




"Sahil Malik [MVP]" <(E-Mail Removed)> wrote in message
news:OFj8#(E-Mail Removed)...
> Angel,
>
> Even when a distributed transaction can be contained using transactions at
> the database level ... do you still recommend using Syst.Tran?
> Why so? I thought MSDTC was evil. (We're talking 2 databases, not one).
>
> - Sahil Malik [MVP]
> http://codebetter.com/blogs/sahil.malik/
>
>
>
> "Angel Saenz-Badillos[MS]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > My vote goes to using System.Transactions in the 2.0 framework as the

best
> > choice.
> > http://blogs.msdn.com/angelsb/archiv...gory/6274.aspx
> >
> > If you want to use v1.1 then I would vote for ServiceConfig.
> > http://blogs.msdn.com/florinlazar/ar...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/
> >
> >
> >
> >
> > "Sahil Malik [MVP]" <(E-Mail Removed)> wrote in message
> > news:O3$(E-Mail Removed)...
> > > 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
> > > news:ub$(E-Mail Removed)...
> > > > 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
> > > >
> > > > "John Papa" <(E-Mail Removed)> wrote in message
> > > > news:9600F50B-920F-4317-B446-(E-Mail Removed)...
> > > > > 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
> > > > >
> > > > >
> > > > > "lottoman2000" wrote:
> > > > >
> > > > >> 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
> > > > >>
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Sahil Malik [MVP]
Guest
Posts: n/a
 
      9th Apr 2005
Right, exactly my thoughts (afterall I learnt all this from you .. LOL).

- Sahil Malik [MVP]
http://codebetter.com/blogs/sahil.malik/





"Angel Saenz-Badillos[MS]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Must have slept through the thread, I thought that he was asking about
> scenarios where a single transaction will not work so no way to use
> transactions at database level. If the question is whether to use dtc or
> local transactions then definitelly use local transactions and preferably
> in
> the stored proc level.
>
> If on the other hand you need to use two connections I would use
> System.Transactions rather than sp_bindsession. Against two different
> servers again dtc is hard to beat.
>
> --
> 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/
>
>
>
>
> "Sahil Malik [MVP]" <(E-Mail Removed)> wrote in message
> news:OFj8#(E-Mail Removed)...
>> Angel,
>>
>> Even when a distributed transaction can be contained using transactions
>> at
>> the database level ... do you still recommend using Syst.Tran?
>> Why so? I thought MSDTC was evil. (We're talking 2 databases, not one).
>>
>> - Sahil Malik [MVP]
>> http://codebetter.com/blogs/sahil.malik/
>>
>>
>>
>> "Angel Saenz-Badillos[MS]" <(E-Mail Removed)> wrote in
>> message
>> news:(E-Mail Removed)...
>> > My vote goes to using System.Transactions in the 2.0 framework as the

> best
>> > choice.
>> > http://blogs.msdn.com/angelsb/archiv...gory/6274.aspx
>> >
>> > If you want to use v1.1 then I would vote for ServiceConfig.
>> > http://blogs.msdn.com/florinlazar/ar...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/
>> >
>> >
>> >
>> >
>> > "Sahil Malik [MVP]" <(E-Mail Removed)> wrote in message
>> > news:O3$(E-Mail Removed)...
>> > > 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
>> > > news:ub$(E-Mail Removed)...
>> > > > 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
>> > > >
>> > > > "John Papa" <(E-Mail Removed)> wrote in message
>> > > > news:9600F50B-920F-4317-B446-(E-Mail Removed)...
>> > > > > 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
>> > > > >
>> > > > >
>> > > > > "lottoman2000" wrote:
>> > > > >
>> > > > >> 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
>> > > > >>
>> > > >
>> > > >
>> > >
>> > >
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Enterprise Library the successor to Enterprise Services? =?Utf-8?B?QmVu?= Microsoft C# .NET 4 5th Sep 2007 11:41 PM
Enterprise Services in ASP.NET the4man Microsoft ASP .NET 1 3rd May 2006 08:31 PM
using enterprise services in asp.net z f Microsoft ADO .NET 0 14th Sep 2005 06:50 PM
Enterprise Services - ASP.Net Mythran Microsoft ASP .NET 2 29th Mar 2004 09:00 PM
.NET Enterprise Services using C# wycklk Microsoft Dot NET 0 8th Jul 2003 10:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:33 AM.