Print Page | Close Window

Default Transactions Settings are not honored in some stored procedure queries.

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3885
Printed Date: 05-Jun-2025 at 4:23pm


Topic: Default Transactions Settings are not honored in some stored procedure queries.
Posted By: ritaf
Subject: Default Transactions Settings are not honored in some stored procedure queries.
Date Posted: 11-Jan-2013 at 1:21pm

Default Transactions Settings are not honored in some stored procedure queries.

 

In our application we don’t set TransactionSetting for individual queries.  We rely on the setting of the 

TransactionSettings.Default that we set in the application start up.  

We have encountered an intermittent problem where some stored procedure queries get their 

TransactionSettings.Timeout reset to ADO.Net default (1 minute) causing “Transaction Timeout” 

EntityServerException with FailureType = Other.  While investigating the problem we have noticed that 

TransactionSettings.Default.Timeout, and EntityManager.DefaultQueryStrategy.TransactionSettings.Timeout

are both set to the correct value, but query.QueryStrategy.TransactionSettings.Timeout is set to 1 min.

Do you know of any reasons why TransactionSettings.Timeout of the individual queries are not defaulted to the

 TransactionSetting.Default and fall back to Ado.Net default? 

 

Thank you,

ritaf




Replies:
Posted By: kimj
Date Posted: 11-Jan-2013 at 5:53pm
No, I don't know of any reasons why this might occur.  I've run a few tests for some edge conditions which might flush this out, but don't see it happening.  In general, when a StoredProcQuery is constructed its QueryStrategy is set to DataSourceOnly and it will use the TransactionSettings.Default.Timeout.  When the StoredProcQuery is serialized to the server this QueryStrategy is serialized with it.  The only time DevForce will set the Timeout on the TransactionSettings is in its parameterless constructor, where we use the 1 minute default.
 
Since the problem is intermittent it could indicate a multi-threading problem, so if you're doing any multi-threading this is one thing to look at.  Also check if a Querying/Fetching handler or EntityServerQueryInterceptor could be changing the QueryStrategy. 


Posted By: ritaf
Date Posted: 19-Feb-2013 at 9:58am
Thank you for the reply.  There is another post in the forum (http://www.ideablade.com/forum/forum_posts.asp?TID=3974&title=silverlight-how-to-handle-nested-executeasync-with-devforce) about  a bug that DevForce fixed for timeouts in the StoredProcQuery.  We will try with v6.1.12.

Thank you,
ritaf



Print Page | Close Window