Return to Snippet

Revision: 15108
at June 24, 2009 10:30 by liqweed


Initial Code
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="${db.driver}"/>
    <property name="url" value="${db.url}"/>
    <property name="username" value="${db.username}"/>
    <property name="password" value="${db.password}"/>
    <property name="maxIdle" value="10"/>
    <property name="maxActive" value="100"/>
    <property name="maxWait" value="10000"/>
    <property name="validationQuery" value="select 1"/>
    <property name="testOnBorrow" value="false"/>
    <property name="testWhileIdle" value="true"/>
    <property name="timeBetweenEvictionRunsMillis" value="1200000"/>
    <property name="minEvictableIdleTimeMillis" value="1800000"/>
    <property name="numTestsPerEvictionRun" value="5"/>
    <property name="defaultAutoCommit" value="false"/>
</bean>

Initial URL
http://commons.apache.org/dbcp/configuration.html

Initial Description


Initial Title
A generic DBCP connection pool Spring bean

Initial Tags
java

Initial Language
XML