is transaction-support in overkill?


does anybody have experience with the 'transaction' keyword of the @page directive in

<% @page ... transaction="Requires | Supported | RequiresNew | ..." %>

I will give the points not for a solution but for a 'best practices' of how and when I should use
Microsoft transaction server (MTS) as a transaction layer. Especially the influence on performance
and reliability would be very interesting.

As I am in the middle of a time-critical project I appreciate any quick help :-)

Thx in advance,
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This link will explain you about when to use com+ services...
it also shows u how to use them
this will show u how it works internally and why its over kill..

This is excellent resource about COM+Services...

foobar43Author Commented:

great, in-deep information even though the information itself is another overkill :-)

Definitely I will take the time after the project to read all of it, but apparently I would appreciate
some real-life experience with COM+ transactions in the scope of ASP.NET pages.

I expect them to be a great way to keep all the database operations within the
page in one great transaction that would roll back in the case of error / exception.

It this true or would someone suggest to use local transactions instead?

  SqlConnection conn = ....
  SqlTransaction trans = conn.BeginTransaction();


  <%@ page transaction="RequiresNew" %>

Especially I am interested in the performance impact and the reliability of the
MTS service itself. We all know M$ products from time to time have their
little problems...

thx @lot
I will prefer the MTS transactions in case there are multiple database and connections involved....for single connection/database i will prefer the first method...

Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

foobar43Author Commented:
makes sense...

just one thing without wanting to stretch your patience too far:

I have a couple of business objects that encapsulate the database data like


in order to keep the interface to these objects pure and clean I implicitly get a pooled
SqlConnection inside the business object method


public Product FindByName(string name)
  SqlConnection conn = Database.GetConnection(); // get a pooled connection


In order to use local transactions I would probably need

public Product FindByName(SqlTransaction trans, string name)
  SqlConnection = trans.Connection;

I think having system-specific stuff as part of the business object
methods would be really a loss of purity. Automatic transactions with COM+
would prevent that and even simplify programming.

Do you think the possible loss of performance is significant / worth it?

Is pooling connections inside the methods really crappy or can you live with it?

mucho gracias
foobar43Author Commented:
little typo:

public Product FindByName(string name)

public static Product FindByName(string name)
first, I would check that whats the necessicity of transaction for GETTING data....

Usually we use transactions to maintain data in that case, u will use it usually while u Insert/update data in database.

Second, like when u r updating more then one tables, I would take an approach that I just call stored proc passing it to necessary paras...and then in that stored proc, i will use sql servers begintran committran and in between i will update multiple tables.

>I think having system-specific stuff as part of the business object
>methods would be really a loss of purity. Automatic transactions with COM+
>would prevent that and even simplify programming.

I agree with this...but COM+ is using interop which significantly adds overheads to your application which I would avoid till it is strictly desired...

instead you can use a seperate Data access layer, which is invoked by your business layer..If you got some time, I recommended Microsoft data access block to study..


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
foobar43Author Commented:
hey, thanks a lot for your help!!

for now I got enough information to put a decision on the current project.
I will go for a mixture of local and stored procedure transactions for the
benefit of speed (plus one service less needed to run my app -
namely MS-DTC).

despite the points I got some nice information for you too which I found
previously. very nice article on performance and .net-transactions in web-apps:

you are absolutely right, the com+ interop overhead is just _too_ much...

thanks and have a nice day

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.