Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2004

Tip: Looking for answers? Try searching our database.

trasactionAtributte Vs SqlTransaction object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken - 18 Oct 2004 19:25 GMT
This is a basic question:

Is it better to use the TrasactionAtributte on a Web Method (COM+) than use
a normal SqlTransaction object ?

What is the advantage on performance and transaction security?

ken
Dan Rogers - 16 Nov 2004 23:42 GMT
Hi Ken,

Here's my take on your question.

When you choose to use a SQL transaction, you are defining the boundary of
the transaction in your stored procedure or application code.  This will
work fine for many self contained applications that are not intended to be
aggregated into larger transactions in a compose-able manner.

When you use COM+ transaction attributes, you are describing how your
component can participate in a transaction.  For instance, you can say that
your component will not participate in a transaction, that your component
always opens a new transaction context, or even that your component can
participate in an existing transaction - starting a new one only if one is
not already started.

This kind of declarative and compose-able transaction ability lets you
program components that can be placed into transactions in ways that the
original programmer didn't know of at the time a component was coded.

Contrast this to the self contained, and non-compose-able SQL transaction
object, and you end up with several useful transaction approaches to use as
you need them in your application designs.

As for efficiency, that is a hard to pin-down term without more specifics.  
There is programmer efficiency, network efficiency, throughput factors,
etc.  That said, it is fair to say that some people feel that COM+
transactions and the use of the distributed transaction coordinator
introduces added scale-out issues to consider before making a statement
that places one transaction approach over the other with an "always"
attached.  In the SQL transaction, the one SQL server is the arbibitrator
of the transaction bounds, so there is less communication going on over the
network.  However, in the case where you need to coordinate
two-phase-commit over several resources that are transaction enabled, you
end up using a coordinator anyhow, so the only gain is in the
single-database, database-only, multi-table consistent update case.

I hope this helps,

Dan Rogers
Microsoft Corporation
--------------------
>Thread-Topic: trasactionAtributte Vs SqlTransaction object
>thread-index: AcS1P8oPP1nkdzq8Qnif2IE7Q8k+CA==
[quoted text clipped - 17 lines]
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:25891
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
[quoted text clipped - 6 lines]
>
>ken
Ken - 17 Nov 2004 01:24 GMT
uff helps a lot, Thks.

> Hi Ken,
>
[quoted text clipped - 71 lines]
> >
> >ken

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.