Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 14th, 2006, 03:26 AM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 99
Thanks: 0
Thanked 1 Time in 1 Post
Default About DTS transactions

There has been some discussion recently about the Distributed Transaction Service(DTS) errors that occur in UpdateOrder and InsertOrder methods of the MB.TheBeerHouse.BLL.Store.Order class that probably needs some explanation.

When using a TransactionScope object, in our case scope, DTS will most likely be called to perform the transaction handling. In a large scale website where the SQL server may not reside on the same machine, or there may be multiple databases, this makes sense because if errors occur the transaction can be cancelled, maintaining the database integrity.

In the UpdateOrder method, note that we update the order and then we turn around and do multiple decrement operations to the products. If all goes well, there is no problem, however what if one of the decrements fails? Likely we want a rollback of all the operations so that the stock counts can accurately reflect the stock. Because all of this is taking place in the business tier we're using TransactionScope.

Now here's the nasty part. When TransactionScope initializes it determines if DTS should be called to optimize the transaction. My understanding is that this is determined primarily by the number of unique connections that are open. So, if you want keep the transaction processing from being "promoted" you have to limit the number of connections that are open or use connection pooling.

Simply eliminating the transaction processing is not a good solution, in my opinion, but if you're willing to take the chance then more power to you.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transactions???? CRONER BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 February 4th, 2009 04:43 PM
Chapter 8 - Transactions jamocle BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 9 February 25th, 2008 10:05 AM
transactions.... Johnslg BOOK: Expert SQL Server 2005 Integration Services ISBN: 978-0-470-13411-5 0 August 20th, 2007 08:51 AM
Chapter 3 - Transactions PedroPN BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 December 1st, 2006 07:42 PM
Transactions and @@IDENTITY roniestein Access 0 December 5th, 2003 08:13 PM



All times are GMT -4. The time now is 10:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.