BoneCP数据连接池 配置

来源:互联网 发布:淘宝马切达工作室 编辑:程序博客网 时间:2024/04/28 01:03
#分区数,默认值2,最小1,推荐3-4,视应用而定  
partitionCount=3 
#每个分区最大的连接数 
maxConnectionsPerPartition=30 
#每个分区最小的连接数  
minConnectionsPerPartition=10 
#当每个分区中的connection大约快用完时,BoneCP动态批量创建connection,这个属性控制一起创建多少个connection 
acquireIncrement=5 
#设置连接池阀值,这个参数默认为20,如果小于0或是大于100,BoneCP将设置为20 
poolAvailabilityThreshold=20 
#设置获取connection超时的时间,这个参数默认为Long.MAX_VALUE,单位:毫秒 
connectionTimeout=9223372036854775807 

#设置connection助手线程个数,这个参数默认为3,如果小于0,BoneCP将设置为3 
releaseHelperThreads=3 
#设置statement助手线程个数,这个参数默认为3,如果小于0,BoneCP将设置为3 
statementReleaseHelperThreads=3 
#设置connection的存活时间,这个参数默认为0,单位:毫秒,设置为0该功能失效 
maxConnectionAge=0 
#连接池中未使用的链接最大存活时间,单位是分,默认值:60,如果要永远存活设置为0 
idleMaxAge=240 
#设置测试connection的间隔时间,这个参数默认为240,单位:分钟,设置为0该功能失效
idleConnectionTestPeriod=60 

#设置重新获取连接的次数,这个参数默认为5 
acquireRetryAttempts=5 
#设置重新获取连接的次数间隔时间,这个参数默认为7000,单位:毫秒,如果小于等于0,BoneCP将设置为1000 
acquireRetryDelay=1000 
#设置连接池初始化功能,这个参数默认为false,设置为true,连接池将会初始化为空 
lazyInit=false 
#缓存prepared statements的大小,默认值:0 
statementCacheSize=100 
#设置是否关闭JMX功能,这个参数默认为false 
disableJMX=false 
#设置连接池名字,用于当作JMX和助手线程名字的后缀 
poolName=littleAntSid

0 0
原创粉丝点击