Question regarding org.apache.commons.dbcp.BasicDataSource
问题 I fixed some bug related to the way we were using BasicDataSource and though I understand part of it I still have some questions unanswered :) Problem: The application was not able to auto-connect to the database after a db failure. Application is using org.apache.commons.dbcp.BasicDataSource class as a TCP-connection pool for a JDBC connection to Oracle db. Fix: After some research I discovered that in BasicDataSource testOnBorrow and testOnreturn were not set. I provided the validation