c3p0参数解释
来源:互联网 发布:郑州大学软件学院算211 编辑:程序博客网 时间:2024/06/18 09:31
#最常用配置
#initialPoolSize:连接池初始化时创建的连接数,default : 3,取值应在minPoolSize与maxPoolSize之间
c3p0.acquireIncrement=5
#管理连接池的大小和连接的生存时间
#maxIdleTime:连接的最大空闲时间,如果超过这个时间,某个数据库连接还没有被使用,则会断开掉这个连接。如果为0,则永远不会断开连接,即回收此连接。default : 0 单位 s
c3p0.idleConnectionTestPeriod=900
#配置PreparedStatement缓存
#连接池为数据源缓存的PreparedStatement的总数。由于PreparedStatement属于单个Connection,所以这个数量应该根据应用中平均连接数乘以每个连接的平均PreparedStatement
#来计算。同时maxStatementsPerConnection的配置无效。default : 0(不建议使用)
#如果设置的好,肯定是可以提高性能的。为0的时候不缓存。default : 0(看情况而论)
c3p0.maxStatementsPerConnection=30
#重连相关配置
#acquireRetryAttempts:连接池在获得新连接失败时重试的次数,如果小于等于0则无限重试直至连接获得成功。default : 30(建议使用)
# 不为0则当时间到的时候如果仍没有获得连接,则会抛出SQLException。
其实就是acquireRetryAttempts*acquireRetryDelay。default : 0(与上面两个,有重复,选择其中两个都行)
c3p0.checkoutTimeout=100
#其他
#autoCommitOnClose:连接池在回收数据库连接时是否自动提交事务。如果为false,则会回滚未提交的事务,如果为true,则会自动提交事务。default : false(不建议使用)
c3p0.numHelperThreads=10
#initialPoolSize:连接池初始化时创建的连接数,default : 3,取值应在minPoolSize与maxPoolSize之间
c3p0.initialPoolSize=10
c3p0.minPoolSize=10
c3p0.maxPoolSize=50
c3p0.acquireIncrement=5
#管理连接池的大小和连接的生存时间
#maxIdleTime:连接的最大空闲时间,如果超过这个时间,某个数据库连接还没有被使用,则会断开掉这个连接。如果为0,则永远不会断开连接,即回收此连接。default : 0 单位 s
c3p0.maxIdleTime=600
c3p0.idleConnectionTestPeriod=900
#配置PreparedStatement缓存
#连接池为数据源缓存的PreparedStatement的总数。由于PreparedStatement属于单个Connection,所以这个数量应该根据应用中平均连接数乘以每个连接的平均PreparedStatement
#来计算。同时maxStatementsPerConnection的配置无效。default : 0(不建议使用)
c3p0.maxStatements=500
#如果设置的好,肯定是可以提高性能的。为0的时候不缓存。default : 0(看情况而论)
c3p0.maxStatementsPerConnection=30
#重连相关配置
#acquireRetryAttempts:连接池在获得新连接失败时重试的次数,如果小于等于0则无限重试直至连接获得成功。default : 30(建议使用)
c3p0.acquireRetryAttempts=5
c3p0.acquireRetryDelay=1000
c3p0.breakAfterAcquireFailure=false
# 不为0则当时间到的时候如果仍没有获得连接,则会抛出SQLException。
其实就是acquireRetryAttempts*acquireRetryDelay。default : 0(与上面两个,有重复,选择其中两个都行)
c3p0.checkoutTimeout=100
#其他
#autoCommitOnClose:连接池在回收数据库连接时是否自动提交事务。如果为false,则会回滚未提交的事务,如果为true,则会自动提交事务。default : false(不建议使用)
c3p0.autoCommitOnClose=false
c3p0.numHelperThreads=10
原文:http://blog.csdn.net/xb12369/article/details/41517409
阅读全文
0 0
- c3p0 参数解释
- c3p0 参数解释
- c3p0参数解释
- c3p0参数解释
- c3p0 参数解释
- c3p0参数解释
- c3p0参数解释
- c3p0参数解释
- c3p0参数解释
- c3p0参数解释
- 数据库连接池C3P0参数解释
- C3P0连接池参数解释
- c3p0连接池参数解释
- c3p0连接池参数解释
- C3P0连接池参数解释
- C3P0连接池参数解释
- C3P0的连接池参数解释
- C3P0连接池配置文件参数解释
- 微信公众号自动化遇到的问题
- EasyUI datagrid获取数据问题
- 心理与自我生活 2
- body 标签禁止横纵滚动条
- servlet实现验证码
- c3p0参数解释
- 1<<i 和 if(i&(1<<j))的用法
- iptables 详解
- 百度之星1002 度度熊的王国战略 并查
- C#特性
- Semaphore
- python的base64
- Python 玩具 —— 使用 os , reuqests 配合 you-get 自动下载网易公开课视频
- Yii2学习笔记:关于params['breadcrumbs'][]