commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBCP-329) SQLException: Already closed.
Date Tue, 30 Mar 2010 04:22:27 GMT

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

Paul Benedict commented on DBCP-329:
------------------------------------

Phil, you piqued my interest. Let's say a production database crashes during the day (my company
is familiar with it!), which naturally kills all connections. The crash happened in-between
the last good operation but before the close(). Do you intend an exception to propagate to
the caller who is now finished with the database? Just seems like an unnecessary hassle. Any
further thoughts?

> SQLException: Already closed.
> -----------------------------
>
>                 Key: DBCP-329
>                 URL: https://issues.apache.org/jira/browse/DBCP-329
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: MySQL
>            Reporter: Hontvari Jozsef
>
> After upgrading to 1.4 I see such exceptions logged:
> java.sql.SQLException: Already closed.
> 	at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114)
> 	at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
> 	...
> This should never happen. According to the Connection.close() javadoc: 
> "Calling the method close on a Connection object that is already closed is a no-op."
>  
> Moreover, I am pretty sure that our code does not close the connection twice. But because
the close() is called in a finally block, it is possible that this exception hides another
exception. Unfortunately I cannot reproduce it, even though it occurs regularly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message