在Hibernate中配置Proxool连接池
1:在applicationContext.xml中配置SessionFactory
org.hibernate.dialect.9Dialect
true
conf/proxool.properties
hibernate-oracle
2:配置Proxool(conf/proxool.properties)
#jdbc-0.proxool.alias=mysql
#jdbc-0.proxool.driver-class=org.gjt.mm.mysql.Driver
#jdbc-0.proxool.driver-url=jdbc:mysql://localhost:3306/contestdb?user=root&password=1234&useUnicode=true&characterEncoding=utf8
#jdbc-0.user=root
#jdbc-0.password=1234
jdbc-0.proxool.alias=hibernatea-oracle
jdbc-0.proxool.driver-class=oracle.jdbc.driver.Driver
jdbc-0.proxool.driver-url=jdbc:oracle:thin:@172.16.2.6:1521:dbname
jdbc-0.user=username
jdbc-0.password=username
jdbc-0.proxool.maximum-connection-count=20
jdbc-0.proxool.house-keeping-test-sql=SELECT SYSDATE FROM DUAL;
#DEBUG, INFO, WARN, ERROR, FATAL.
jdbc-0.proxool.statistics-log-level=ERROR
【责编:Peng】
--------------------next---------------------
阅读(374) | 评论(0) | 转发(0) |