TransactionScope, timeouts and "Explicit Unbind"

TransactionScope, timeouts and "Explicit Unbind"

Old forum URL: forums.lhotka.net/forums/t/6880.aspx


Vaidal posted on Thursday, April 30, 2009

Anyone is using TransactionScope?

With SQL Server?

Do you know about setting "Explicit Unbind" value in the "TransactionBinding" parameter of the connection string?

ajj3085 replied on Thursday, April 30, 2009

Yes, yes, and no.. can you provide a reference to TransactionBinding?

Vaidal replied on Monday, May 04, 2009

"When you use TransactionScope and set the timeout to a certain value (not sure what is the default is not specified) and the timeout elapsed before the TX is completed, what happens is that actions made before the timeout is rolled back but after that, the connection unbinds itself from the transaction and if any action, places itself in autocommit mode (just like a regular connection) and if actions are made after the timeout (BUT still inside the TransactionScope, since these were performed in autocommit mode, they will not be rolled back). "

http://weblogs.asp.net/ryangaraygay/archive/2008/04/14/issue-with-system-transactions-sqlconnection-and-timeout.aspx

RockfordLhotka replied on Monday, May 04, 2009

Wow, that seems like a big limitation on the TransactionScope object.

Fortunately you can always tell the data portal to use EnterpriseServices transactions instead :)

Vaidal replied on Monday, May 04, 2009

Well, you can avoid this behaviour adding "Transaction Binding = Explicit Unbind" in the connection string.

We are testing it now...

Copyright (c) Marimer LLC