system.transactions

Strategies to Avoid Transaction Escalation in System.Transactions

So, based on the answer to my previous question, transactions do get elevated from the LTM to the DTC if multiple connections are opened during a transaction, even if the connections all have the same connection string. So, my next question is, what strategies could one employ to avoid this "feature?" It seems to me that, based on resou...

Transaction Scope

How does the transaction scope work? How does it know when there is another context being used already and how might I implement another kind of scope in my code. I'm primarily a vb.net developer but I can read the c# if you write in that. In case the above was too vague: I understand what system.transactions does and how to use it. ...

Trace why a transaction is escalated to DTC

Is there any way to determine precisely why a System.Transaction TrasactionScope is being escalated to the DTC? We are hitting a bump with one of our components that seem to escalate the transaction while all other components (which seem deceptively similar) does not do escalation. Are any information made available on the reasons for t...

Java Transactions API and .NET System.Transactions

I'm analyzing the different behaviors between the JTA (Java Transactions API) and the .NET counterpart System.Transactions: the approach is quite different between the two of them. In fact, Java's version of Transactions seems more a specification, leaving to developers the obligation to implement either the Transactions, TransactionMana...

.net durable resource manager for transactional filesystem access

I'm trying to wrap my head around the use of the System.Transactions namespace in C#. I've found some documentation on MSDN regarding using resource managers, but it only covers volatile, in-memory resource managers in any detail (like Transactional ). I'm basically looking for something that I can use inside of a TransactionScope, just...

TransactionInDoubtException using System.Transactions on SQL Server 2005

The underlying question to this post is "Why would a non-promoted LTM Transaction ever be in doubt?" I'm getting System.Transactions.TransactionInDoubtException and i can't explain why. Unfortunately i cannot reproduce this issue but according to trace files it does happen. I am using SQL 2005, connecting to one database and using one ...

Sharing transactions with EF and other technologies?

We have an application with a lot of legacy code, with many different technologies: COM+ Objects written in Delphi 5 COM+ Objects written in .NET OCX controls written in Delphi 5 ASP pages ASPX pages In our data access layer, we are working with old ADO (not .NET ADO) because we need compatibility against legacy code, and now we are at...

Is something along the lines of nested memoization needed here?

System.Transactions notoriously escalates transactions involving multiple connections to the same database to the DTC. The module and helper class, ConnectionContext, below are meant to prevent this by ensuring multiple connection requests for the same database return the same connection object. This is, in some sense, memoization, altho...

MSDTC attempts to enlist client machine in a distributed transaction

Hi there We're seeing the following intermittent warning logged by MSDTC: A caller has attempted to propagate a transaction to a remote system, but MSDTC network DTC access is currently disabled on machine 'X'. Please review the MS DTC configuration settings. However, MSDTC is disabled on machine X by design - it's a clien...

How .net allows nested transactions with TransactionScopeOption

I have learned that Oracle & sql server database does not allow nested transactions. Then how does c# allow us to perform nested transactions using transactionscopeoption? ...

what is practical use of System.Transactions?

I have seen System.Transactions namespace, and wondered, can I actually make a RDMBS with this namespace usage? But when I saw some examples, I do not understand how System.Transactions does anything beyond simple try catch and getting us success/failure result? This is the example on MSDN's website, I know it may be very simple but I...

Inner TransactionScope with different IsolationLevel, how can it be achieved?

The current implementation of TransactionScope lacks the ability to change IsolationLevels in nested scopes. MSDN states: When using nested TransactionScope objects, all nested scopes must be configured to use exactly the same isolation level if they want to join the ambient transaction. If a nested TransactionScope object tries to joi...

Example of alternative to TransactionCompleted event?

From the MSDN entry for TransactionCompleted: You can register for this event instead of using a volatile enlistment to get outcome information for transactions. Caution Signing up for this event negatively affects the performance of the transaction it is attached to. Does anyone have an example, or even an explanation, of how...