`

C3P0常用配置整理收集

    博客分类:
  • J2SE
阅读更多
<!--连接耗尽时一次获取的连接数 Default: 3 -->
<property name="acquireIncrement" value="3"/>
 
<!--获取新连接失败后重试次数 Default: 30 -->
<property name="acquireRetryAttempts" value="30"/>
 
<!--每次重试连接间隔时间 Default: 1000 -->
<property name="acquireRetryDelay" value="1000"/>
 
<!--连接关闭时默认将所有未提交的操作回滚。Default: false -->
<property name="autoCommitOnClose" value="false"/>
 
<!-- 连接池用完时,等待获取新连接的超时时间,0表示无限等待。Default: 0 -->
<property name="checkoutTimeout" value="0"/>
 
<!-- 每次间隔XX时间对空闲连接进行有效性检查。Default: 0 -->
<property name="idleConnectionTestPeriod" value="0"/>
 
<!--初始化连接数,取值介于minPoolSize与maxPoolSize之间。Default: 3 -->
<property name="initialPoolSize" value="3"/>
 
<!--最大空闲时间,XX时间内未使用则连接被丢弃。0表示永不丢弃。Default: 0 -->
<property name="maxIdleTime" value="0"/>
 
<!--连接池中保留的最大连接数。Default: 15 -->
<property name="maxPoolSize" value="15"/>
 
<!--控制数据源内缓存PreparedStatement数量。maxStatements与maxStatementsPerConnection均为0,表示缓存被关闭。Default: 0-->
<property name="maxStatements" value="0"/>
 
<!--maxStatementsPerConnection定义连接池内单个连接所拥有的最大缓存statements数量。Default: 0 -->
<property name="maxStatementsPerConnection" value="0"/>
 
<!--连接池中保留的最大连接数。Default: 3 -->
<property name="minPoolSize" value="3"/>
 
<!--true表示取得连接时进行连接有效性的检查。Default: false -->
<property name="testConnectionOnCheckin" value="false"/>
 
<!--性能消耗大,true表示每个connection提交的时候都进行有效性检查。建议使用idleConnectionTestPeriod或automaticTestTable等方法来提升连接测试的性能。Default: false -->
<property name="testConnectionOnCheckout" value="false"/>
 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics