commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vjeran Marcinko" <>
Subject [dbpc-1.2.1 or pool-1.2] bug with invalid DB connection
Date Sat, 24 Jul 2004 08:31:57 GMT
Hi folks.

I'm using GenericKeyedObjectPool and KeyedCPDSConnectionFactory.

As I see, pool should return db connection from borrowObject() method when
it has been validated by validationQuery.
But current situation is that when some connection proved to be *invalid* by
this validation query, pool is trying to close this connection, and that
raises IOException since this connection is invalid in first place, and pool
doesn't ignore this exception but propagates it, instead to continue looping
and searching for valid one (or creating new one).

Thus, it should be
if(_testOnBorrow && !_factory.validateObject(key,pair.value)) {
    try {
    } catch (Exception ex) {
    // ignore

inside borrowObject() in GenericKeyedObjectPool.
Or this exception ca also be ignored in KeyedCPDSConnectionFactory's

Am I right ?


Tis.kis d.o.o
Heinzelova 33
10000 Zagreb, CROATIA
Phone: +385 91 2392624

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message