You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of the MyBatis.NET are you using?
IBatisNet.DataMapper.dll (version 1.6.2)
IBatisNet.DataAccess.dll (version 1.9.2)
Issue:
Hello we've got very big problem with timeout expiring often when using Ibatis
with long transactions.
I realized that SqlMapper methods (QueryForObject<T>, etc) ultimately rely on
SqlMapSession.CreateCommand
and that method is the one setting the commandTimeout on the command.
My methods use code like this:
protected T Select(string statementName, object parameterObject)
{
IDaoManager daoManager = DaoManager.GetInstance(this);
SqlMapDaoSession sqlMapDaoSession = (SqlMapDaoSession)daoManager.LocalDaoSession;
ISqlMapper mapper = sqlMapDaoSession.SqlMap;
return mapper.QueryForObject<T>(statementName, parameterObject);
}
How can I change them to be able to set the CommandTimeout.
I saw that almost all the methods are public so I guess it should be possible.
Could you give me any advice or code snippet?
I know that the connection timeout is copied to the command timeout but
changing the connection timeout in the connection string is not viable for us
because we cannot increase the timeout in the whole application.
Thank you very much for your help
Original issue reported on code.google.com by [email protected] on 8 Apr 2011 at 10:33
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 8 Apr 2011 at 10:33The text was updated successfully, but these errors were encountered: