Geeks With Blogs
Pradeep Loganathan Distributed January 2006 Entries
Transactions with MSDTC
Was playing around with MSDTC today and had a a big gotcha. If you get any issues with the distrubuted transaction check this. Go to Component services MMC and right click on My Computer --> Properties and then click on the MSDTC tab and then on Security configuration . Make sure that “Network DTC access ” is checked and so is “No authentication required”. I have also posted some sample code for directly working on the MSDTC transactions. #include <windows.h> #include ......

Posted On Tuesday, January 17, 2006 12:27 PM

Problems with declarative model
The declarative model has the following problems Forces you to inherit from Serviced component limiting any class modeling that you may want to implement. Always makes use of MSDTC even if the transaction is local and restricted to only one resource. MSDTC is mainly used for transactions that span multiple resources and is a huge overhead on transactions involving only one resource. Forces you to use the COM+ model such as stateless objects et al ......

Posted On Friday, January 13, 2006 7:19 AM

Problems with declarative model
The declarative model has the following problems Forces you to inherit from Serviced component limiting any class modeling that you may want to implement. Always makes use of MSDTC even if the transaction is local and restricted to only one resource. MSDTC is mainly used for transactions that span multiple resources and is a huge overhead on transactions involving only one resource. Forces you to use the COM+ model such as stateless objects et al ......

Posted On Friday, January 13, 2006 6:25 AM

Declarative/Implicit Transactions in .Net 1.0/1.1:
When transactions span across multiple resources each additional resource increases the chances of failure. For transactions spanning across multiple resources windows uses the MSDTC service. MSDTC coordinates between all the resource managers involved in the transaction using OLE TX . namespace TestTrans1 { [Transaction] class Worker : ServicedComponent { public void DoWork() { string ConnectionString = "connection string"; System.Data.IDbConnection Conn = new System.Data.SqlClient.SqlCo... ......

Posted On Friday, January 13, 2006 6:11 AM

Explicit Transactions
Explicit Transactions: Explicit transactions are basically ADO.net based transactions where you need to explicitly enlist & manage a transaction. If you are transaction spans a single resource you should be using this . The sample below lists a Explicit transaction. using System; using System.Data.SqlClient; namespace TransTest1 { class Class1 { [STAThread] static void Main(string[] args) { string ConnectionString = ""; System.Data.IDbConnection Conn = new System.Data.SqlClient.SqlCo... ......

Posted On Thursday, January 12, 2006 8:43 AM

Copyright © Pradeep Loganathan | Powered by: GeeksWithBlogs.net