Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.dw;
 
 
 public class HealthCheckForBDB extends HealthCheck
 {
     protected final Stores<?,?> _bdb;
    
    public HealthCheckForBDB(ServiceConfig configStores<?,?> bdb)
    {
        super("BDB-JE");
         = bdb;
    }
    @Override
    protected Result check() throws Exception
    {
    	// TODO: check basics, like availability of BDB-JE
        if (.isActive()) {
            return Result.healthy();
        }
        String msg = .getInitProblem();
        if (msg != null) { // failed to start:
            return Result.unhealthy("BDB stores not active since initialization failed: "+msg);
        }
        return Result.unhealthy("BDB stores not active: no init problem set so most likely has been shut down");
    }
New to GrepCode? Check out our FAQ X