@Override
    public boolean isAvailable(final SamlRegisteredService service) {
        if (supports(service)) {
            val ds = JpaBeans.newDataSource(samlIdPProperties.getMetadata().getJpa());
            return JpaBeans.isValidDataSourceConnection(ds, DATA_SOURCE_VALIDITY_TIMEOUT_SECONDS);
        }
        return false;
    }
This is {@link JpaSamlRegisteredServiceMetadataResolver}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-saml-idp-metadata-jpa/src/main/java/org/apereo/cas/support/saml/metadata/resolver/JpaSamlRegisteredServiceMetadataResolver.java