[
https://issues.apache.org/jira/browse/DBCP-415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13968749#comment-13968749
]
Sebb commented on DBCP-415:
---------------------------
OK, having thought some more I agree it's probably not the lack of synch within
the class (though it would not do any harm to limit mutability).
I still think we should document the thread safety of the various classes so
end users know not to share statements etc between threads.
Note that it is not only concurrent access that can cause a problem, the Java
memory model means that synch. is needed to ensure safe publication of updates
to mutable fields.
We sh/could also point out in a general page that POOL takes special care to
ensure safe publication of changes to mutable fields, which is why the
instances can be shared via the pool.
> 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)