[ https://issues.apache.org/jira/browse/DBCP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13967930#comment-13967930 ]
Phil Steitz commented on DBCP-415: ---------------------------------- The test succeeds if I move the finalizer for DelegatingStatment to PoolablePreparedStatement (and to PoolableCalledStatement too). I think that what is going on here is that PoolablePreparedStatements themselves wrap DelegatingStatements (created by their owning PoolingConnection's delegate) and we don't want these wrapped statements to be closed by finalizers. Limiting close-by-finalizer to the PoolableXxxStatements themselves gets them returned to the pool and does not have this effect. > Pooled PreparedStatements may be closed when accessed > ----------------------------------------------------- > > Key: DBCP-415 > URL: https://issues.apache.org/jira/browse/DBCP-415 > Project: Commons Dbcp > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Phil Steitz > > Under high concurrency, connections using pooled PreparedStatements may > encounter SQLExceptions with messages of the form > "org.apache.commons.dbcp2.PoolablePreparedStatement with address: 'quoted > SQL' is closed." -- This message was sent by Atlassian JIRA (v6.2#6252)