最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501
当前位置: 首页 - 科技 - 知识百科 - 正文

bonecp数据源的使用

来源:懂视网 责编:小采 时间:2020-11-09 15:02:13
文档

bonecp数据源的使用

bonecp数据源的使用:bonecp.properties jdbc.driverClass=oracle.jdbc.driver.OracleDriverjdbc.jdbcUrl=jdbc:oracle:thin:@192.168.30.4:1521:testjdbc.username=testjdbc.password=test#Sets the minimum number of connections that will be contained in every partition. bo
推荐度:
导读bonecp数据源的使用:bonecp.properties jdbc.driverClass=oracle.jdbc.driver.OracleDriverjdbc.jdbcUrl=jdbc:oracle:thin:@192.168.30.4:1521:testjdbc.username=testjdbc.password=test#Sets the minimum number of connections that will be contained in every partition. bo

bonecp.properties jdbc.driverClass=oracle.jdbc.driver.OracleDriverjdbc.jdbcUrl=jdbc:oracle:thin:@192.168.30.4:1521:testjdbc.username=testjdbc.password=test#Sets the minimum number of connections that will be contained in every partition. bo

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 
#helper threads). Useful when your application is doing lots of work on 
#each connection (i.e. perform an SQL query, do lots of non-DB stuff and 
#perform another query), otherwise will probably slow things down. 
bonecp.releaseHelperThreads=3
#Instruct the pool to create a helper thread to watch over connection acquires 
#that are never released (or released twice). This is for debugging purposes only 
#and will create a new thread for each call to getConnection(). Enabling this 
#option will have a big negative impact on pool performance.
bonecp.closeConnectionWatch=false
#If enabled, log SQL statements being executed.
bonecp.logStatementsEnabled=false
#Sets the number of ms to wait before attempting to obtain a connection 
#again after a failure.
bonecp.acquireRetryDelayInMs=7000
#Set to true to force the connection pool to obtain the initial connections 
#lazily.
bonecp.lazyInit=false
#Set to true to enable recording of all transaction activity and replay the 
#transaction automatically in case of a connection failure.
bonecp.transactionRecoveryEnabled=false
#After attempting to acquire a connection and failing, try to connect these many 
#times before giving up. Default 5.
bonecp.acquireRetryAttempts=5
#Set to true to disable JMX.
bonecp.disableJMX=false
#Queries taking longer than this limit to execute are logged.
bonecp.queryExecuteTimeLimitInMs=0
#Sets the Pool Watch thread threshold. The pool watch thread attempts to 
#maintain a number of connections always available (between minConnections and maxConnections). This value 
#sets the percentage value to maintain. For example, setting it to 20 means 
#that if the following condition holds: Free Connections / MaxConnections < poolAvailabilityThreshold 
#new connections will be created. In other words, it tries to keep at 
#least 20% of the pool full of connections. Setting the value to zero 
#will make the pool create new connections when it needs them but it 
#also means your application may have to wait for new connections to be 
#obtained at times. Default: 20.
bonecp.poolAvailabilityThreshold=20
#If set to true, the pool will not monitor connections for proper closure. 
#Enable this option if you only ever obtain your connections via a mechanism 
#that is guaranteed to release the connection back to the pool (eg Spring's 
#jdbcTemplate, some kind of transaction manager, etc).
bonecp.disableConnectionTracking=false
#Sets the maximum time (in milliseconds) to wait before a call to getConnection 
#is timed out. Setting this to zero is similar to setting it 
#to Long.MAX_VALUE Default: 0 ( = wait forever )
bonecp.connectionTimeoutInMs=0
#Sets the no of ms to wait when close connection watch threads are 
#enabled. 0 = wait forever.
bonecp.closeConnectionWatchTimeoutInMs=0
#Sets number of statement helper threads to create that will handle releasing a 
#statement. When this value is set to zero, the application thread is 
#blocked until the pool and JDBC driver are able to close off the 
#statement. When a non-zero value is set, the pool will create threads 
#that will take care of closing off the statement asychronously to the application 
#via the release helper threads). Useful when your application is opening up 
#lots of statements otherwise will probably slow things down.
bonecp.statementReleaseHelperThreads=0
#Sets the maxConnectionAge in seconds. Any connections older than this setting will be 
#closed off whether it is idle or not. Connections currently in use will 
#not be affected until they are returned to the pool.
bonecp.maxConnectionAgeInSeconds=0
#If set to true, keep track of some more statistics for exposure via 
#JMX. Will slow down the pool operation.
bonecp.statisticsEnabled=false
#If set to true, no attempts at passing in a username/password will be 
#attempted when trying to obtain a raw (driver) connection. Useful for cases when 
#you already have another mechanism on authentication eg NTLM.
bonecp.externalAuth=false

applicationContenxt.xml



	
	
	classpath:cn/com/config/dataSource/bonecp.properties
	
	



	
	
	



	
	
	
	
	

	
	
	
	
	
	

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文档

bonecp数据源的使用

bonecp数据源的使用:bonecp.properties jdbc.driverClass=oracle.jdbc.driver.OracleDriverjdbc.jdbcUrl=jdbc:oracle:thin:@192.168.30.4:1521:testjdbc.username=testjdbc.password=test#Sets the minimum number of connections that will be contained in every partition. bo
推荐度:
标签: 使用 数据源 bonecp
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top