Skip to content

Configuration List

欧德 edited this page Oct 19, 2021 · 3 revisions

Configuration List

Item Name Desc Default
username jdbc username empty
password jdbc password empty
jdbcUrl jdbc url empty
driverClassName jdbc driver class name empty
poolName pool name,if not set,auto generated empty
fairMode indicator,true:pool will use fair semaphore and fair transfer policy false
initialSize size of connections on pool starting 0
maxActive max reachable size of connections in pool 10
borrowSemaphoreSize max permit size of pool semaphore min(maxActive/2,CPU core size)
defaultAutoCommit 'autoCommit' property default value true
defaultTransactionIsolationCode 'transactionIsolation'property default value,if not set,then read out from first connection -999
defaultCatalog 'catalog' property default value empty
defaultSchema 'schema' property default value empty
defaultReadOnly 'readOnly' property default value false
maxWait milliseconds:max wait time to get one connection from pool 8000
idleTimeout milliseconds:max idle time of connections,when reach,then close them and remove from pool 18000
holdTimeout milliseconds:max no-use time of borrowed connections,when reach,then return them to pool by forced close 18000
validTestSql connection valid test sql on borrowed SELECT 1
validTestTimeout seconds:max time to get valid test result 3
validAssumeTime milliseconds:connections valid assume time after last activity,if borrowed,not need test during the duration 500
forceCloseUsingOnClear using connections forced close indicator on pool clear false
delayTimeForNextClear milliseconds:delay time for next loop to clear,whenforceCloseUsingOnClear is false and exists using connections 3000
timerCheckInterval milliseconds:interval time to run timer check task 18000
connectionFactoryClassName raw JDBC connection factory class name empty
enableJmx boolean indicator,true:register dataSource to jmx false
enableConfigLog boolean indicator,true:print config item info on pool starting false
enableRuntimeLog boolean indicator,true:print runtime log false

配置列表

项名 描述 默认值
username JDBC用户名
password JDBC密码
jdbcUrl JDBC连接URL
driverClassName JDBC驱动类名
poolName 池名,如果未赋值则会自动产生一个
fairMode 是否使用公平模式 false(竞争模式)
initialSize 连接池初始大小 0
maxActive 连接池最大个数 10
borrowSemaphoreSize 信号量许可大小 min(最大连接数/2,CPU核心数)
defaultAutoCommit 连接上的AutoComit默认值 true
defaultTransactionIsolationCode 事物隔离代码,未设置时则从第一个连接上读取 -999
defaultCatalog Catalog默认值
defaultSchema Schema默认值
defaultReadOnly ReadOnly默认值 false
maxWait 连接借用等待最大时间(毫秒) 8000
idleTimeout 连接闲置最大时间(毫秒) 18000
holdTimeout 连接被持有不用最大允许时间(毫秒) 18000
validTestSql 连接有效性测试SQL语句 SELECT 1
validTestTimeout 连接有效性测试超时时间(秒) 3
validAssumeTime 连接测试的间隔时间(毫秒) 500
forceCloseUsingOnClear 是否直接关闭使用中连接 false
delayTimeForNextClear 延迟清理的时候时间(毫秒) 3000
timerCheckInterval 闲置扫描线程间隔时间(毫秒) 18000
connectionFactoryClassName 自定义的JDBC连接工作类名
enableJmx JMX监控支持开关 false
enableConfigLog 是否打印配置信息 false
enableRuntimeLog 是否打印运行时日志 false