Tomcat连接池的属性设置

时间:2017-01-05 08:25:40

标签: jdbc connection tomcat7 jndi application-pool

我的Web应用程序通过Tomcat jdbc池连接数据库。

这是我的Tomcat context.xml

<Resource
            factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
            name="jdbc/OracleDB"
            auth="Container"
            type="javax.sql.DataSource"
            initialSize="70"
            maxActive="100"
            maxIdle="30"
            minIdle="10"
            maxWait="5000"
            removeAbandoned="true"
            removeAbandonedTimeout="60"
            username="XXOO"
            password="XXOO"
            driverClassName="oracle.jdbc.driver.OracleDriver"
            validationQuery="SELECT 'OK'"
            testWhileIdle="true"
            testOnBorrow="true"
            numTestsPerEvictionRun="5"
            timeBetweenEvictionRunsMillis="30000"
            minEvictableIdleTimeMillis="60000"
            url="jdbc:oracle:thin:@XXOO:testdb"/>

连接超时将发生1min50sec

如果我使用JDBC连接数据库,则不会发生。

那么我丢失或修改了什么设置?

0 个答案:

没有答案
相关问题