[
https://issues.apache.org/jira/browse/DBCP-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644940#action_12644940
]
Stefan Rempfer commented on DBCP-273:
-------------------------------------
Class: InstanceKeyObjectFactory
Revision: 479137
Date: 2006-11-25 08:51:48 -0700 (Sat, 25 Nov 2006)
Method: private void setCommonProperties(Reference ref, InstanceKeyDataSource
ikds)
Line: 175
Code-Snipped:
Bug:
---------
ra = ref.get("testOnBorrow");
if (ra != null && ra.getContent() != null) {
ikds.setTestOnBorrow(
Boolean.getBoolean(ra.getContent().toString()));
}
Solution:
------------
ra = ref.get("testOnBorrow");
if (ra != null && ra.getContent() != null) {
ikds.setTestOnBorrow(
Boolean.valueOf(ra.getContent().toString()));
}
> validation on testonborrow does not work
> ----------------------------------------
>
> Key: DBCP-273
> URL: https://issues.apache.org/jira/browse/DBCP-273
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 1.2.1, 1.2.2
> Reporter: mark lin
>
> Our use of dbcp (1.2.1 and 1.2.2) shows that connection validation on
> testonborrow does not work. The pool still return closed connections. The
> error is in the following code. See the commented out line for the specific
> error.
> ----------------------
> ra = ref.get("testOnBorrow");
> if (ra != null && ra.getContent() != null) {
> //comment out old code
>
> //ikds.setTestOnBorrow(Boolean.getBoolean(ra.getContent().toString()));
>
> ikds.setTestOnBorrow(Boolean.valueOf(ra.getContent().toString()).booleanValue());
> }
> ra = ref.get("testOnReturn");
> if (ra != null && ra.getContent() != null) {
> ikds.setTestOnReturn(Boolean.valueOf(
> ra.getContent().toString()).booleanValue());
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.