commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rozensky, Ronald S \(Ronald\)" <rozen...@avaya.com>
Subject commons dbcp throws sqlexception when connection is already closed
Date Fri, 03 Feb 2006 19:10:23 GMT
We recently implemented DBCP in a project and received an sqlexception
from DBCP when closing a connection that was already closed:

java.sql.SQLException: Connection is closed.
 at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.che
ckOpen(PoolingDataSource.java:174)
 at
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.clo
se(PoolingDataSource.java:179)

Is this not a violation of contract with the Connection interface?
Snippet from the java.sql.Connection.close() API:

Calling the method close on a Connection object that is already closed
is a no-op.

Granted there was bug in our code, but shouldn't DBCP's
PoolingDataSource abide by the contract specified in the Connection
interface?

I found this Bugzilla bug when looking into this:
http://issues.apache.org/bugzilla/show_bug.cgi?id=12409

Ronald Rozensky
Avaya, Inc.


---------------------------------------------------------------------
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