DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22750>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22750

BasicDataSource always sets testOnBorrow if given a validation query

           Summary: BasicDataSource always sets testOnBorrow if given a
                    validation query
           Product: Commons
           Version: Nightly Builds
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Dbcp
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


BasicDataSource performs the following code if given a validation query:

if (validationQuery != null) {
  connectionPool.setTestOnBorrow(true);
}

This means that a validation query will always get executed on borrow, it can 
only additionally get executed on return or idle too.

To be able to run a validation query on either borrow, return, or idle, 
BasicDataSource should just set testOnBorrow if no other strategy given:

if (validationQuery != null && !testOnReturn && !testWhileIdle) {
  connectionPool.setTestOnBorrow(true);
}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to