commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akom (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DBCP-23) [dbcp] SQLException When PoolablePreparedStatement Already Closed
Date Fri, 15 Dec 2006 15:39:23 GMT
     [ 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message