commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBCP-331) GenericKeyedObjectPool.borrowObject does not invalidate object if validateObject fails
Date Fri, 16 Apr 2010 01:41:26 GMT

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

Phil Steitz commented on DBCP-331:
----------------------------------

Thanks for digging into this further.  The top stack trace is troubling and may point to a
dbcp bug.  I don't see anything wrong with the pool part of this, so I moved the issue to
dbcp.   The torque client is calling getConnection on SharedPoolDataSource with no username
or password, which means a <null, null> key (need to look into the torque code to verify
that this is normal and what it means).  In dbcp 1.4, as part of the changes to support password
changes (DBCP-8), equality among UserPassKeys was changed to identify keys with the same username.
  I don't yet have an explanation for the trace.  I will dig into the torque code this weekend
and see if I can figure our what is going on.   

> GenericKeyedObjectPool.borrowObject does not invalidate object if validateObject fails
> --------------------------------------------------------------------------------------
>
>                 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
>
> 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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message