日期:2014-05-16 浏览次数:20469 次
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName"> <value>oracle.jdbc.driver.OracleDriver</value> </property> <property name="url"> <value>jdbc:oracle:thin:@192.168.1.110:1521:orcl</value> </property> <property name="username"> <value>用户名</value> </property> <property name="password"> <value>密码</value> </property> <property name="maxActive"> <value>50</value> </property> <property name="maxIdle"> <value>2</value> </property> <property name="maxWait"> <value>120000</value> </property> <property name="defaultAutoCommit"> <value>false</value> </property> <property name="testOnBorrow"> <value>true</value> </property> <property name="testOnReturn"> <value>false</value> </property> <property name="validationQuery"> <value>select 1 from dual</value> </property> </bean>
<Resource name="jdbc/hb" auth="Container" type="com.mchange.v2.c3p0.ComboPooledDataSource" /> <ResourceParams name="jdbc/hb"> <parameter> <name>factory</name> <value>org.apache.naming.factory.BeanFactory</value> </parameter> <parameter> <name>driverClass</name> <value>oracle.jdbc.driver.OracleDriver</value> </parameter> <parameter> <name>jdbcUrl</name> <value>jdbc:oracle:thin:@127.0.0.1:1521:orcl</value> </parameter> <parameter> <name>user</name> <value>hb</value> </parameter> <parameter> <name>password</name> <value>hb</value> </parameter> <parameter> <name>minPoolSize</name> <value>30</value> </parameter> <parameter> <name>maxPoolSize</name> <value>200</value> </parameter> <parameter> <name>initialPoolSize</name> <value>30</value> </parameter> <parameter> <name>acquireIncrement</name> <value>30</value> </