commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anjan" <an...@bluewireless.com>
Subject [DBCP] : DelegatingConnection/PoolableConnection Bug ?
Date Tue, 02 Apr 2002 16:03:56 GMT
Hi,

	I have been using DBCP with mySQL and Oracle using
DriverManagerConnectionFactory, StackObjectPool and KeyedObjectPoolFactory.
I use the code like follows :
I am getting an exception from PoolableConnection (saying that the
Connection is
already closed) when I call a sequence like this

====================
conn.close();
..
..
if (conn.isClosed()) {
   conn.close(); // THROWS EXCEPTION
}

I found that the method DelegatingConnection.isClosed() is delegating it to
the underlying driver (mySQL)-- where connection state
is open (since the Connection was only returned to the pool). close() is
obviously not delegated to the underlying driver.

Am I missing something here -- it appears that this functionality should
have
been tested by the user base by now ?

Should we be intercepting the isClosed() at PoolableConnection() instead of
letting DelegatingConnection handle it ?

I'm currently eating the exception -- but believe that this should be fixed.
Can work on a fix if I get a suitable suggestion.

Thanks very much,
ANJAN. B


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message