`
cuilji
  • 浏览: 67213 次
  • 性别: Icon_minigender_1
  • 来自: 本溪
社区版块
存档分类
最新评论

C3P0 连接池

阅读更多
一、有三种获取具备连接池特性的数据源的途径:
1. 直接实例化 ComboPooledDataSource bean;
2. use the DataSources factory class;
3. "build your own" pool-backed DataSource by directly instantiating PoolBackedDataSource and setting its ConectionPoolDataSource.

二、配置
    无论以什么方式获得了DataSource,c3p0都可以提供一个名为 c3p0.properties 的文件来配置该数据源,从c3p0-0.9.1开始,还可以通过文件c3p0-config.xml来进行高级配置。如果为提供任何配置文件数据源仍然可以使用缺省配置来工作。

三、Spring API LocalSessionFactoryBean建议使用spring配置的数据源而略去使用Hibernate connection provider参数于 setHibernateProperties(Properties hibernateProperties)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics