New Posts New Posts RSS Feed: Default Transactions Settings are not honored in some stored procedure queries.
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

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

 Post Reply Post Reply
Author
ritaf View Drop Down
Newbie
Newbie


Joined: 23-Jan-2012
Posts: 5
Post Options Post Options   Quote ritaf Quote  Post ReplyReply Direct Link To This Post Topic: Default Transactions Settings are not honored in some stored procedure queries.
    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

Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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. 
Back to Top
ritaf View Drop Down
Newbie
Newbie


Joined: 23-Jan-2012
Posts: 5
Post Options Post Options   Quote ritaf Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down