[ 
https://issues.apache.org/jira/browse/DBCP-331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859129#action_12859129
 ] 

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: http://commons.apache.org/patches.html 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: https://issues.apache.org/jira/browse/DBCP-331
>             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.java
>
>
> 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.

Reply via email to