Current implementation uses Agroal emptyValidator for validating database connections causing all connections to be always valid. Using emptyValidator results in failed sql queries when broken connections are returned from the pool. Connection may be broken due to various reasons e.g. database restart or connection loss.
This change brings use of defaultValidator which periodically checks each connection in the pool to be valid.
User may configure his own sql connection validator using sql provided with configuration key:
datasources[0].pool.connection-valid-sql
Current implementation uses Agroal emptyValidator for validating database connections causing all connections to be always valid. Using emptyValidator results in failed sql queries when broken connections are returned from the pool. Connection may be broken due to various reasons e.g. database restart or connection loss.
This change brings use of defaultValidator which periodically checks each connection in the pool to be valid. User may configure his own sql connection validator using sql provided with configuration key:
datasources[0].pool.connection-valid-sql