The following settings determine whether and how the pool performs connection validation.
If true, the pool validates connections (checks to find out if they are usable) before providing them to an application.
If possible, keep the default value, false. Requiring connection validation forces the server to apply the validation algorithm every time the pool returns a connection, which adds overhead to the latency of getConnection(). If the database connectivity is reliable, you can omit validation.
Type of connection validation to perform. Must be one of:
auto-commit: attempt to perform an auto-commit on the connection.
metadata: attempt to get metadata from the connection.
table (performing a query on a specified table). Must also set Table Name. You may have to use this method if the JDBC driver caches calls to setAutoCommit() and getMetaData().
Because many JDBC drivers cache the results of these calls, they do not always provide reliable validations. Check with the driver vendor to determine whether these calls are cached or not.
Whether to close all connections in the pool if a single validation check fails. The default is false. One attempt will be made to re-establish failed connections.