[ http://issues.apache.org/jira/browse/DBCP-23?page=all ]
Akom updated DBCP-23:
---------------------
Attachment: patch.txt
Patch to have the close method only check the local _closed flag, fixing pool
starvation issue when underlying connection closes itself (eg MySQL)
> [dbcp] SQLException When PoolablePreparedStatement Already Closed
> -----------------------------------------------------------------
>
> Key: DBCP-23
> URL: http://issues.apache.org/jira/browse/DBCP-23
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.2
> Environment: Operating System: All
> Platform: All
> Reporter: JZ
> Fix For: 1.3
>
> Attachments: issue32441.patch, patch.txt
>
>
> When closing an already closed
> org.apache.commons.dbcp.PoolablePreparedStatement, a SQLException is thrown
> when
> the isClosed() method returns true.
> This seems to violate the contract of java.sql.Statement (super interface of
> implemented PreparedStatement) whose javadoc reads " Calling the method close
> on
> a Statement object that is already closed has no effect."
> Work around exists -- when ever closing a statement, also null out. Then,
> before closing, check that it's non-null.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]