You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Kevin Schmidt (JIRA)" <ji...@apache.org> on 2011/02/24 18:42:38 UTC
[jira] Commented: (DBCP-331) SharedPoolDataSource does not handle
null keys correctly
[ https://issues.apache.org/jira/browse/DBCP-331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998952#comment-12998952 ]
Kevin Schmidt commented on DBCP-331:
------------------------------------
I am seeing this issue in the 1.4 release. I use JTDS as well and am seeing the exact behavior that Gabor Horvath has reported. This appears to be a concurrency issue since it only happens under heavy server load.
Gabor, have you found any work arounds? Are you using the patch in production?
Configuration Options
maxActive=200
minEvictableIdleTimeMillis=1800000
numTestsPerEvictionRun=5
testOnBorrow=0
testOnReturn=1
testWhileIdle=1
timeBetweenEvictionRunsMillis=60000
whenExhaustedAction=0
preferredTestQuery=select db_id()
Thanks,
Kevin
> 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
> Fix For: 1.3.1, 1.4.1
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira