Class DBHealthCheck

  • All Implemented Interfaces:
    org.eclipse.microprofile.health.HealthCheck

    @Liveness
    @Readiness
    @ApplicationScoped
    public class DBHealthCheck
    extends Object
    implements org.eclipse.microprofile.health.HealthCheck
    Check the health of the database connection.
    • Constructor Detail

      • DBHealthCheck

        public DBHealthCheck()
        For use with RESTeasy and CDI proxies.
        API Note:
        This construtor is used by CDI runtimes that require a public, no-argument constructor. It should not be invoked directly in user code.
      • DBHealthCheck

        @Inject
        public DBHealthCheck​(DataSource dataSource)
        Create a db connection health checker.
        Parameters:
        dataSource - the datasource
    • Method Detail

      • call

        public org.eclipse.microprofile.health.HealthCheckResponse call()
        Specified by:
        call in interface org.eclipse.microprofile.health.HealthCheck