网上没有找到比较合适的,自己看了看,然后放到项目中实验的一下。
很多人都认为比DBCP优秀。
${jdbc.driverClassName}
${jdbc.url}
${jdbc.username}
${jdbc.password}
10
5
30
5
10
0
以下几个参数是使用的基本配置参数:
initialPoolSize:
Number of Connections a pool will try to acquire upon startup. Should be between minPoolSize and maxPoolSize
连接池初始化时获取的链接数,介于minPoolSize和maxPoolSize之间
minPoolSize:
Minimum number of Connections a pool will maintain at any given time.
最小链接数
maxPoolSize:
Maximum number of Connections a pool will maintain at any given time.
最大连接数
acquireIncrement:
Determines how many connections at a time c3p0 will try to acquire when the pool is exhausted.
在当前连接数耗尽的时候,一次获取的新的连接数
maxIdleTime:
Seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire.
最大空闲的时间,单位是秒,无用的链接再过时后会被回收
发表于 2006-12-18 18:24 我不是张嘎-小兵 阅读(10443) 评论(4) 编辑 收藏 所属分类: 项目实践