Bill Gorder wrote:I see you are using ibatis not mybatis. Just an FYI ibatis is no longer supported. Try to set that property on your datasource wherever it is configured.
From the documentation:
<transactionManager type="JDBC">
<property name="DataSource" value="DBCP"/>
<property name="JDBC.Driver" value="${driver}"/>
<property name="JDBC.ConnectionURL" value="${url}"/>
<property name="JDBC.Username" value="${username}"/>
<property name="JDBC.Password" value="${password}"/>
<property name="JDBC.DefaultAutoCommit" value="false" />
<!-- The following are optional -->
<property name="Pool.MaximumActiveConnections" value="10"/>
<property name="Pool.MaximumIdleConnections" value="5"/>
<property name="Pool.MaximumWait" value="60000"/>
<!-- Use of the validation query can be problematic. If you have difficulty, try without it. -->
<property name="Pool.ValidationQuery" value="select 1 from ACCOUNT"/>
<property name="Pool.LogAbandoned" value="false"/>
<property name="Pool.RemoveAbandoned" value="false"/>
<property name="Pool.RemoveAbandonedTimeout" value="50000"/>
</transactionManager>
Hi Bill,
Really to happy to see your reply, I guess no one is using iBatis now. Actually, I am not good in using it but my team likes to use this.
May I ask your help again? I have two questions hope you can help to answer,
(1) Can Spring replace iBatis without any code changes?
(2) Suppose our dao.xml config like this
<daoConfig>
<context>
<transactionManager type="JDBC">
<property name="DataSource" value="JNDI"/>
<property name="DBJndiContext" value="java:comp/env/jdbc/ds-mssql"/>
</transactionManager>
<dao interface="com.test.DownloadDaoIF" implementation="com.test.DownloadDaoJdbc" />
</context>
Is it possible I put "<property name="JDBC.DefaultAutoCommit" value="false" />" in the dao.xml to control the JDBC driver to set
AutoCommit mode to false?
Really thanks for your help and advice,
Ray