[ 
https://issues.apache.org/jira/browse/DBCP-274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Khawaja Shams closed DBCP-274.
------------------------------

    Resolution: Invalid

I am sorry; it turns out that I did need to set the validationQuery string as 
the createDataSource method sets the test properties to false.  

> DBCP Returns a closed connection even though testOnBorrow is set to true
> ------------------------------------------------------------------------
>
>                 Key: DBCP-274
>                 URL: https://issues.apache.org/jira/browse/DBCP-274
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Khawaja Shams
>
> Hello,
>   I am using a BasicDataSource to acquire connections.  The particular 
> service that is facing the issue basically goes through periods of high 
> activity followed by many hours of idle time.  After long idle times, DBCP 
> starts returning closed connections. I tried setting the testOnBorrow flag 
> BEFORE any connections were acquired, but it has not helped the situation.  
> One caveat is that I am not setting the validationQuery string.  This is only 
> because as far as I could tell, if the validationQuery is null, the pool will 
> simply check if the connection is open.  Please let me know if I can provide 
> any more information.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to