论坛首页 综合技术论坛

DBCP with iBATIS

浏览 4460 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (1) :: 隐藏帖 (0)
作者 正文
   发表时间:2009-04-17   最后修改:2010-11-04
    
  • 大小: 18.1 KB
   发表时间:2009-10-06   最后修改:2009-10-06
我的XML设置如下:

	<property name="Pool.MaximumActiveConnections" value="10"/>
	<property name="Pool.MaximumIdleConnections" value="5"/>
	<property name="Pool.MaximumCheckoutTime" value="120000"/>
	<property name="Pool.RemoveAbandoned" value="false"/>
	<property name="Pool.RemoveAbandonedTimeout" value="50000"/>
         <property name="Pool.TimeToWait" value="500"/>


-不过没未仔细研究过里面的配置的影响

-#是否自动回收超时连接
dataSource.removeAbandoned=true设置为true的话,DBCP会自动回收超过RemoveAbandonedTimeout的对象,是否对你有帮助?
贴段官方解释:

引用
removeAbandoned false Flag to remove abandoned connections if they exceed the removeAbandonedTimout.
If set to true a connection is considered abandoned and eligible for removal if it has been idle longer than the removeAbandonedTimeout. Setting this to true can recover db connections from poorly written applications which fail to close a connection. 




-你说的DB连不上,莫非你的程序不DOWN下来? con也应该获取不到,不报异常么?

-或者,你表达的意思是想做个"守护进程"出来管理DBCP的连接?????
0 请登录后投票
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics