在Hibernate中配置Proxool连接池
,Y:ET1: 1:在applicationContext.xml中配置SessionFactory
L;7u0Yg - <bean id="sessionfactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
- <prop key="hibernate.show_sql">true</prop>
- <!--指定Proxool配置文件-->
- <prop key="hibernate.proxool.properties">conf/proxool.properties</prop>
- <!--<prop key="hibernate.proxool.xml">conf/proxool.xml</prop>-->
- <!--指定Proxool的alias,必须与Proxool的配置文件中的alias一致-->
- <prop key="hibernate.proxool.pool_alias">hibernate-oracle</prop>
- </props>
- </property>
- </bean>
Qe[ejj1o: 2:配置Proxool(conf/proxool.properties)
Bj=lUn`T: = 9Ow!(!@ - #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.OracleDriver
- 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
=JkPE2mU diz=|g=w Wbq0K6X