ibatis 执行查询后连接不能自动关闭,不能自动回收
数据库是oracle
配置文件如下.在用ibatis连接数据库的时候,点击查询,执行一条查询语句后连接就一直存在。不能自动关闭与回收。select * from v$session where username='*',查询得到的连接数会越来越多。
<sqlMapConfig>
<settings cacheModelsEnabled="true" enhancementEnabled="true"
lazyLoadingEnabled="true" errorTracingEnabled="true" maxRequests="32"
maxSessions="10" maxTransactions="2" useStatementNamespaces="false" />
<transactionManager type="JDBC" commitRequired="true">
<dataSource type="DBCP">
<property name="JDBC.Driver"
value="oracle.jdbc.driver.OracleDriver" />
<property name="JDBC.ConnectionURL"
value="jdbc:oracle:thin:@*****" />
<property name="JDBC.Username" value="*" />
<property name="JDBC.Password" value="*" />
<property name="Pool.MaximumActiveConnections" value="10" />
<property name="Pool.MaximumIdleConnections" value="5" />
<property name="Pool.MaximumCheckoutTime" value="30000" />
<property name="Pool.PingQuery" value="select 1 from ACCOUNT" />
<property name="Pool.PingEnabled" value="false" />
<property name="Pool.PingConnectionsOlderThan" value="1" />
<property name="Pool.PingConnectionsNotUsedFor" value="1" />
<property name ="Pool.RemoveAbandoned" value ="true" />
<property name ="Pool.RemoveAbandonedTimeout" value ="20000" />
</dataSource>
</transactionManager>
<sqlMap
resource="com/asiainfo/common/listquery/dao/enpty/SqlMapping_tmp_bill_query.xml" />
</sqlMapConfig>
------解决方案--------------------ibatis 不负责关闭连接的,关闭是由开发人员自己负责的吧?
------解决方案--------------------ibatis 是自动关闭连接的 你说的情况不会发生
------解决方案--------------------