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

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

Hello [~sjhala]
Thank you for your report.
Would you please test with 2.11.0? If any change is made it would be for 2.11.1.
TY!

> DBCP Does not check the validity of DB connection at the time creating 
> preparedStatement
> ----------------------------------------------------------------------------------------
>
>                 Key: DBCP-594
>                 URL: https://issues.apache.org/jira/browse/DBCP-594
>             Project: Commons DBCP
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>         Environment: OS: CentOS
> DB: PostgreSQL
> Java: openjdk 17.0.8.1 2023-08-24
>            Reporter: Shaktisinh Jhala
>            Priority: Major
>         Attachments: ExceptionStackTrace.txt
>
>
> Recently we observed an issue of "This connection has been closed." while 
> borrowing prepared statement from the pool. 
> It was trying to create a new PreparedStatement using the pooled connection 
> object. And the Pooled connection object was already closed due to some 
> reason.
> There are two configurations testOnCreate and testOnBorrow ensures that the 
> connection is validated after create and before borrow. However, there is no 
> validation check on the connection before using it for creating prepared 
> statement. This missing check  lead to above stated error. 
> Attached is the exception stack trace for this issue.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to