入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

Proxool 0.9.1 srping配置的BUG修正

创建时间:2011-01-03 投稿人: 浏览次数:2782

Proxool支持一个连接数查看器,对于监控程序是否有连接释放很有好处,可惜最新的0.9.1版本有BUG,导致了以前的配置无法使用。网上有些办法说采用修改后打包jar,都OO了,弄那么复杂干啥,写个类直接覆盖几个方法就可以:

 

package com.mycompany;

 

public class ProxoolDataSource extends org.logicalcobwebs.proxool.ProxoolDataSource {

 public void setHouseKeepingSleepTime(long houseKeepingSleepTime) {
  super.setHouseKeepingSleepTime((int)houseKeepingSleepTime);
 }

 public void setMaximumConnectionLifetime(long maximumConnectionLifetime){
  super.setMaximumConnectionLifetime((int)maximumConnectionLifetime);
 }

 public void setOverloadWithoutRefusalLifetime(long overloadWithoutRefusalLifetime) {
  super.setOverloadWithoutRefusalLifetime((int)overloadWithoutRefusalLifetime);
    }

    public void setRecentlyStartedThreshold(long recentlyStartedThreshold) {
     super.setRecentlyStartedThreshold((int)recentlyStartedThreshold);
    }
}

然后在spring配置里指向这个类,完工

声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像