设为首页 加入收藏

TOP

bonecp数据源的使用(一)
2014-11-24 07:39:18 来源: 作者: 【 】 浏览:4
Tags:bonecp 数据源 使用
bonecp.properties
jdbc.driverClass=oracle.jdbc.driver.OracleDriver
jdbc.jdbcUrl=jdbc:oracle:thin:@192.168.30.4:1521:test
jdbc.username=test
jdbc.password=test

#Sets the minimum number of connections that will be contained in every partition. 
bonecp.minConnectionsPerPartition=1
#Sets the maximum number of connections that will be contained in every partition. 
#Setting this to 5 with 3 partitions means you will have 15 unique 
#connections to the database. Note that the connection pool will not create all 
#these connections in one go but rather start off with minConnectionsPerPartition and gradually 
#increase connections as required.
bonecp.maxConnectionsPerPartition=5
#Sets the acquireIncrement property.  When the available connections are about to run 
#out, BoneCP will dynamically create new ones in batches. This property controls how 
#many new connections to create in one go (up to a maximum of 
#maxConnectionsPerPartition). Note: This is a per partition setting.
bonecp.acquireIncrement=1
#Sets number of partitions to use.  In order to reduce lock contention 
#and thus improve performance, each incoming connection request picks off a connection from 
#a pool that has thread-affinity, i.e. pool[threadId % partition_count]. The higher this number, 
#the better your performance will be for the case when you have plenty 
#of short-lived threads. Beyond a certain threshold, maintenance of these pools will start 
#to have a negative effect on performance (and only for the case when 
#connections on a partition start running out).  Default: 1, minimum: 1, recommended: 
#2-4 (but very app specific)
bonecp.partitionCount=1
#Sets the idleConnectionTestPeriod.  This sets the time (in minutes), for a connection 
#to remain idle before sending a test query to the DB. This is 
#useful to prevent a DB from timing out connections on its end. Do 
#not use aggressive values here!   Default: 240 min, set to 0 
#to disable
bonecp.idleConnectionTestPeriodInMinutes=240
#Sets the idleConnectionTestPeriod.  This sets the time (in seconds), for a connection 
#to remain idle before sending a test query to the DB. This is 
#useful to prevent a DB from timing out connections on its end. Do 
#not use aggressive values here!   Default: 240 min, set to 0 
#to disable
bonecp.idleConnectionTestPeriodInSeconds=14400
#Sets Idle max age (in min).  The time (in minutes), for a 
#connection to remain unused before it is closed off. Do not use aggressive 
#values here!  Default: 60 minutes, set to 0 to disable.
bonecp.idleMaxAgeInMinutes=60
#Sets Idle max age (in seconds).  The time (in seconds), for a 
#connection to remain unused before it is closed off. Do not use aggressive 
#values here!  Default: 60 minutes, set to 0 to disable.
bonecp.idleMaxAgeInSeconds=3600
#Sets statementsCacheSize setting.  The number of statements to cache.
bonecp.statementsCacheSize=0
#Sets number of helper threads to create that will handle releasing a connection. 
#When this value is set to zero, the application thread is blocked 
#until the pool is able to perform all the necessary cleanup to recycle 
#the connection and make it available for another thread.  When a non-zero 
#value is set, the pool will create threads that will take care of 
#recycling a connection when it is closed (the application dumps the connection into 
#a temporary queue to be processed asychronously to the application via the release 
#h
首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Vbox创建COM对象失败 下一篇hibernate在tomcat7.X下配置mysql..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·HyperText Transfer (2025-12-26 07:20:48)
·半小时搞懂 HTTP、HT (2025-12-26 07:20:42)
·CPython是什么?PyPy (2025-12-26 06:50:09)
·Python|如何安装seab (2025-12-26 06:50:06)
·python要学习数据分 (2025-12-26 06:50:03)