commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Thomas (JIRA)" <>
Subject [jira] [Commented] (DBCP-249) Validate connection only on create.
Date Mon, 17 Feb 2014 13:54:23 GMT


Mark Thomas commented on DBCP-249:

I can see the use case for testOnCreate. Support for this will need to be added to Commons
Pool. It will only have an effect if testOnBorrow is false, since testOnBorrow triggers a
validation test on create already.

> Validate connection only on create.
> -----------------------------------
>                 Key: DBCP-249
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: New Feature
>    Affects Versions: 1.2.2
>         Environment: All.
>            Reporter: Parag Mehta
>             Fix For: 2.0
> Request to add support for testOnCreate, to validate connections only when they are created,
much less frequent than on borrow.
> This will solve issues where for example driver logs you into master instead of db on
the connection string because db is not available (e.g. Sybase) and then rest of the queries
fail.  This only happens on first login.  Hence validating the correct db using sql can test
such a case so that borrowers are guaranteed correct db without having to testOnBorrow every
> May also be worthwhile to support different validation queries for testing at different
> Thanks.
> Parag

This message was sent by Atlassian JIRA

View raw message