吕明涛 created DBCP-584:
------------------------

             Summary: DBCP minIdle is invalid
                 Key: DBCP-584
                 URL: https://issues.apache.org/jira/browse/DBCP-584
             Project: Commons DBCP
          Issue Type: Bug
    Affects Versions: 2.9.0, 2.8.0
         Environment: Windows 10 ,  Eclipse EE(2021-6),  Java8, Spring 
Framework 5.2
            Reporter: 吕明涛


I use dbcp2 to connect oracle 19c  , but minIdle is invalid, 

List my dataSource as below
{code:java}
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" 
init-method="createDataSource" destroy-method="close">
   <property name="driverClassName" value="oracle.jdbc.OracleDriver" />
     
   <property name="url">
            
<value>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx.xxx)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))</value>
   </property> 
   <property name="username" value="xxxxxx" />
   <property name="password" value="yyyyyyy" /> 
   <property name="connectionProperties" value="v$session.program=LvTest" />    
       <property name="maxTotal" value="100" />
   <property name="maxIdle" value="-1" />
   <property name="minIdle" value="5" />
   <property name="maxWaitMillis" value="5000" />
   <property name="initialSize" value="20" />
   <property name="validationQuery" value="select 1 from dual" />
   <property name="validationQueryTimeout" value="30" />
   <property name="testOnBorrow" value="false"/>
   <property name="testWhileIdle" value="true"/>
   <property name="minEvictableIdleTimeMillis" value="180000"/>
   <property name="timeBetweenEvictionRunsMillis" value="60000"/>  
</bean> {code}
when I start up program , execute SQL "select * from v$session where program 
='LvTest' " 

repeatedly , the queryresult is abnormal

the count of queryresult  increase to 20 rapidly at the begining of the test , 
After 60 seconds count will change to  0 Suddenly

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to