浏览 4458 次
锁定老帖子 主题:DBCP with iBATIS
精华帖 (0) :: 良好帖 (0) :: 新手帖 (1) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-04-17
最后修改:2010-11-04
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间: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的连接????? |
|
返回顶楼 | |