hibernate c0p3 mysql_COP3详细配置说明

C3P0是一个开放源代码的JDBC连接池,它在lib目录中与Hibernate一起发布,包括了实现jdbc3和jdbc2扩展规范说明的Connection 和Statement 池的DataSources 对象。

c3p0-config>

3

30

1000

false

Test

false

100

null

false

60

3

60

15

100

3

root

password

select id from test where id=1

300

false

true

root

在Hibernate(spring管理)中的配置:

oracle.jdbc.driver.OracleDriver

jdbc:oracle:thin:@localhost:1521:Test

Kay

root

###########################

### C3P0 Connection Pool###

###########################

#hibernate.c3p0.max_size 2

#hibernate.c3p0.min_size 2

#hibernate.c3p0.timeout 5000

#hibernate.c3p0.max_statements 100

#hibernate.c3p0.idle_test_period 3000

#hibernate.c3p0.acquire_increment 2

#hibernate.c3p0.validate false

在hibernate.cfg.xml文件里面加入如下的配置:

20

5

120

100

120

2

true

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值