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
Comment #1
Posted on Apr 11, 2011 by Quick ElephantCheck this fix: http://code.google.com/p/mybatisnet/source/detail?r=15
Please check my issue(comment) to this fix too: http://code.google.com/p/mybatisnet/issues/detail?id=10
Maybe it help you.
Status: New
Labels:
Type-Defect
Priority-Low