[ 
https://issues.apache.org/jira/browse/DBCP-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17502007#comment-17502007
 ] 

Gary D. Gregory commented on DBCP-584:
--------------------------------------

I not sure how to help here unless you can provide a reproducer, which would be 
best done as a failing test in a GitHub PR. Our build uses the H2 database so 
anyone can run a build without dependencies on an RDMBS like Oracle. You could 
also provide a standalone Maven project in a zip file attached here. The PR 
route would be best.

> 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.8.0, 2.9.0
>         Environment: Windows 10 ,  Eclipse EE(2021-6),  Java8, Spring 
> Framework 5.2
>            Reporter: 吕明涛
>            Priority: Major
>
> 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