|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem with timeout in TransactionScopeI'm porting my application from ServicedComponents to TransactionScope objects. One of the most fun features of new tech is that it allows transaction timeouts more then 10 minutes. My application has many layers and using SqlTransactions is not convinient. As I undestand if TransactionScope is created with TimeSpan.Zero timeout then transaction manager doesn't control transaction time. But actually the transaction is aborted after 10 minutes timeout set in Machine.config. It is true for both SQL 2000 & SQL 2005. If transactions were created explicitly via CommitableTransaction class, this limitation didin't appear ( but only for SQL 2005, SQL 2000 transaction still were aborted ). After explanation of System.Transaction code via Reflector utility I found that TransactionScope always checks timeout via TransactionManager.ValidateTimeout method while CommittableTransaction doesn't. I guess the the problem can be resolved by changing maximalTimeout in machine.config but it is not applicable in the concrete case. I'm wondering is such behavior of TransactionScope designed? Can I rely that CommittableTransaction preserves this behaviour in the next versions or ..NET? Thank you for your attention. Vladimir. |
|||||||||||||||||||||||