JBPM + SPring + proxool 加载顺序问题

http://my.oschina.net/u/996297/blog/137818

http://www.blogjava.net/titanaly/archive/2010/08/27/330039.html

http://www.iteye.com/topic/252675
  搞这么复杂干嘛?
   直接在application.xml配上
   <prop key="hibernate.proxool.xml">proxool.xml</prop>
  不就OK了

在Hibernate中配置Proxool连接池
1:在applicationContext.xml中配置SessionFactory
<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>
2:配置Proxool.xml()
<?xml version="1.0" encoding="utf-8" ?>
<something-else-entirely>
<proxool>
<alias>www</alias>
<driver-url>
jdbc:oracle:thin:@127.0.0.1:1521/orcl
</driver-url>

<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<!--
<driver-class>com.P6Driver</driver-class>-->
<statistics>1m,15m,1d</statistics>
<driver-properties>
<property name="user" value="scmsp"></property>
<property name="password" value="nstczzh"></property>
<property name="useUnicode" value="true"></property>
<property name="characterEncoding" value="GBK"></property>
</driver-properties>
<maximum-connection-count>50</maximum-connection-count>
<minimum-connection-count>1</minimum-connection-count>
<prototype-count>1</prototype-count>
<maximum-active-time>7200000</maximum-active-time>
<house-keeping-test-sql>select CURRENT_DATE</house-keeping-test-sql>
<house-keeping-sleep-time>30000</house-keeping-sleep-time>

</proxool>

</something-else-entirely>
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.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

你可能感兴趣的:(proxool)