连接池配置!

连接池配置:
1. configProperties.xml
<property name="connectionPool">proxool</property>

2. 此时hibernate.cfg.xml.vm中将调用
#if (${connectionPool}=="proxool")
<property name="proxool.pool_alias">proxoolPool</property> 
<property name="proxool.xml">proxool.cfg.xml</property> 
<property name="connection.provider_class">org.hibernate.connection.ProxoolConnectionProvider</property>

3. proxool.cfg.xml.vm中调整各参数值:
<maximum-new-connections>2</maximum-new-connections>
<maximum-connection-count>10</maximum-connection-count>
<minimum-connection-count>2</minimum-connection-count>

4. 项目中加入lib/connectionPool/proxool-0.9.1.jar

你可能感兴趣的:(连接池配置!)