URGENT...Please suggest how can we implement transactions at BAL in 3 tier architecture not in DAL.

R

ravi.vaswani

Hi,

Please suggest how can we implement transactions at BAL in 3 tier
architecture not in DAL. also objectcontext object which was used with
ASP will be requiered to do this.

Thanks
Ravi
 
S

Sahil Malik [MVP C#]

Unfortunately the answer isn't as simple as your question is.

Transactions implemented in the database are a lot simpler because the
database maintains transactions via log mechanisms. It can offer you
fantastic control over isolation levels - which in turn give you a much more
responsive application.

In contrast, transactions on non-database entities are controlled by a
transaction co-ordinator - MSDTC if in case you are using ObjectContext in
classic ASP. This will invariably bump up your isolation levels in most
instances, and hence lead to a practically unusable production application.

An easy way to create a good implementation is using .NET 2.0/SQL Server
2005/System.Transactions - but apparently you are too far from that
architecture.

Given all of these, I would keep most of your transactions in the DAL,
rather than BL. It sounds like a good idea to make BL operations
transactional, but that requirement is best addressed by proper design of
the BL, not expecting MSDTC/MTS/COM+/EnterpriseServices to take care of this
for you.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top