设为首页 加入收藏

TOP

bonecp数据源的使用(二)
2014-11-24 07:39:18 来源: 作者: 【 】 浏览:3
Tags:bonecp 数据源 使用
elper 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
			
		



		
			
		



		
		
		
		
		

		
		
		
		
		
		
首页 上一页 1 2 下一页 尾页 2/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)