Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 14th, 2006, 03:26 AM
Authorized User
 
Join Date: May 2006
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.






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





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