@Override
    protected Health.Builder checkPool(final Health.Builder builder) {
        try {
            return this.jdbcTemplate.query(this.validationQuery, rs -> {
                if (rs.next()) {
                    return builder.up();
                }
                return builder.down();
            });
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
            return builder.outOfService().withException(e);
        }
    }
Monitors a data source that describes a single connection or connection pool to a database.

@author Marvin S. Addison
@since 3.5.1
support/cas-server-support-jdbc-monitor/src/main/java/org/apereo/cas/monitor/JdbcDataSourceHealthIndicator.java