C3P0
open-source介绍
C3P0是一个开放源代码的JDBC连接池,它在lib目录中与Hibernate一起发布,包括了实现jdbc3和jdbc2扩展规范说明的Connection 和Statement 池的DataSources 对象。
C3P0在spring中的配置
Xml代码 :
基本配置参数:
initialPoolSize:
Number of Connections a pool will try to acquire upon startup. Should be between minPoolSize and maxPoolSize
连接池初始化时获取的链接数,介于minPoolSize和maxPoolSize之间
minPoolSize:
Minimum number of Connections a pool will maintain at any given time.
最小链接数
maxPoolSize:
Maximum number of Connections a pool will maintain at any given time.
最大连接数
acquireIncrement:
Determines how many connections at a time c3p0 will try to acquire when the pool is exhausted.
在当前连接数耗尽的时候,一次获取的新的连接数
maxIdleTime:
Seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire.
最大空闲的时间,单位是秒,无用的链接再过时后会被回收
分享到:
相关推荐
HIbernate连接池配置总结基于第三方c3p0和proxool
本例演示c3p0 、dbcp 、proxool三种常用数据库连接池的用法及log4j2日志使用方法
NULL 博文链接:https://381324504-qq-com.iteye.com/blog/486480
三大连接池参数说明,是本人在网上查找后放在网上备份,希望也对你有用
在Spring3中配置数据源,包括DBCP,C3P0,Proxool,Bonecp主要的数据源,里面包含这些数据源的jar文件和依赖文件及配置文件。。 如Bonecp目前听说是最快的数据源,速度是传统的c3p0的25倍, bonecp.properties文件: ...
NULL 博文链接:https://286.iteye.com/blog/1920417
NULL 博文链接:https://lanyan-lan.iteye.com/blog/509140
博文链接:https://pantao.iteye.com/blog/142280
JAVA数据库连接池(C3P0,Druid,JNDI ,DBCP,Proxool,BoneCP) 源码包含各个数据库连接池的连接DEMO spring+mybatis+maven
目前java中的主流连接池有C3P0、BONCP、DBCP、Proxool...其中,最多人用的是C3P0,因为除了不提供连接池监控,配置简单,持续运行的稳定性很不错,在大并发量下的稳定性也有一定保证
Druid、DBCP、C3P0、JBoss、Weblogic、Proxool 文档中包括 以上各个数据源配置参数中文含义,并不包括配置实例,请注意。