DBCP -dataSource

1909 ワード


<bean id="dataSource"  
        class="org.apache.commons.dbcp.BasicDataSource"  destroy-method="close">  
        <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>