commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] Commented: (DBCP-331) SharedPoolDataSource does not handle null keys correctly
Date Wed, 21 Apr 2010 00:00:15 GMT


Phil Steitz commented on DBCP-331:

Thanks, Gabor.   It's hard to evaluate your patch as attached for three reasons.

1) It includes quite a few changes and is not in diff format.  It would make it much easier
for us if you could install the subversion client, checkout the code in trunk, and generate
a patch using "svn diff" against your checkout.  See the instructions here:
and do not hesitate to ask privately or on the mailing list if you need help getting set up.

2) It would help to explain in more detail why each of the changes is necessary - e.g., the
change to add/remove the latch to/from the allocation queue each time through the loop.  

3) It would *really* help to have a test case that fails before the patch and succeeds after.
  Absent this, a clear description of an execution sequence that leads to a problem is necessary.
 Ideally, this explanation should explain your production stack traces.

Thanks again for reporting the problem that you are seeing and for your suggestions on improving
the code.

> 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.
You can reply to this email to add a comment to the issue online.

View raw message