在tomcat里面配置连接池

<Context path="/fztyjlbweb" docBase="fztyjlbweb" debug="0" reloadable="false" crossContext="true">
      <Resource name="jdbc/tyclub" auth="Container" type="javax.sql.DataSource"/>
      <ResourceParams name="jdbc/tyclub">
     <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
     </parameter>
     <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
     </parameter>
     <parameter>
    <name>maxActive</name>
    <value>5</value>
     </parameter>
     <parameter>
    <name>maxIdle</name>
    <value>1</value>
     </parameter>
     <parameter>
    <name>maxWait</name>
    <value>30000</value>
     </parameter>
     <parameter>
    <name>removeAbandoned</name>
    <value>true</value>
     </parameter>
     <parameter>
    <name>removeAbandonedTimeout</name>
    <value>60</value>
     </parameter>
     <parameter>
    <name>logAbandoned</name>
    <value>false</value>
     </parameter>
     <parameter>
    <name>url</name>
    <value>jdbc:oracle:thin:@192.168.15.15:1521:test15</value>
     </parameter>
     <parameter>
    <name>username</name>
    <value>tyjlb</value>
     </parameter>
     <parameter>
    <name>password</name>
    <value>tyjlbadmin</value>
     </parameter>
      </ResourceParams>
     </Context>

你可能感兴趣的:(apache,oracle,sql,tomcat,jdbc)