commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Thomas (JIRA)" <>
Subject [jira] Commented: (DBCP-331) SharedPoolDataSource does not handle null keys correctly
Date Fri, 16 Apr 2010 16:34:26 GMT


Mark Thomas commented on DBCP-331:

-1 for the patch has currently written. It includes calls to factory methods inside sync blocks
which will cause deadlocks as documented in the comments at the top of the class.

It would help reviewers if you provided a little more detail regarding the sequence of events
that can lead to a threading problem for issues 1) and 2). It may also help to provide separate
patches to address them. As for 3) I will veto any patch based on a 'guess' that there might
be a problem or that guesses at what the problem might be. Patches need to be backed up with
hard evidence.

The code for this and GenericObjectPool is very similar. If there are issues here, there are
probably issue sin GOP that also need to be patched.

For future reference, patches should be provided in diff -u format as this requires significantly
less effort to review.


> SharedPoolDataSource does not handle null keys correctly
> --------------------------------------------------------
>                 Key: DBCP-331
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.3, 1.4
>         Environment: Windows, java version "1.6.0_06", Torque 3.3 (DBCP 1.4, jTDS 1.2.5)
>            Reporter: Gabor Horvath
>         Attachments:
> GenericKeyedObjectPool.borrowObject does not invalidate object if validateObject fails
(line ~1200). I guess invalidation would be needed for objects which are not newly created
(newlyCreated flag in the code).
> Scenario:
> 1.) DB connection put into pool
> 2.) Attempt to reuse connection (borrowObject)
> 3.) Test on borrow (executing simple SQL query) fails: DB connection closed on jTDS level
but connection remains in the pool
> 4.) Subsequent attempts to reuse the connection causes "java.sql.SQLException: Invalid
state, the Connection object is closed"

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message