diff --git a/geoportal-service/pom.xml b/geoportal-service/pom.xml
index e521417..94a9dd0 100644
--- a/geoportal-service/pom.xml
+++ b/geoportal-service/pom.xml
@@ -158,7 +158,7 @@
org.eclipse.microprofile.health
microprofile-health-api
- 4.0
+ 2.2
diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealthCheck.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealthCheck.java
index 5343a76..9530ebc 100644
--- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealthCheck.java
+++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealthCheck.java
@@ -11,7 +11,7 @@ import javax.ws.rs.core.Response;
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
-import org.eclipse.microprofile.health.HealthCheckResponse.Status;
+import org.eclipse.microprofile.health.HealthCheckResponse.State;
import org.eclipse.microprofile.health.Liveness;
import org.gcube.application.cms.implementations.ImplementationProvider;
import org.gcube.application.geoportal.common.model.configuration.MongoConnection;
@@ -40,7 +40,7 @@ public class GeoportalHealthCheck implements HealthCheck {
@Override
public HealthCheckResponse call() {
- return new HealthCheckResponse("geooportal-service", Status.UP, Optional.empty());
+ return new HealthCheckResponse("geooportal-service", State.UP, Optional.empty());
}
@GET
@@ -62,7 +62,7 @@ public class GeoportalHealthCheck implements HealthCheck {
ScopeProvider.instance.set(context);
mongo = ImplementationProvider.get().getProvidedObjectByClass(Mongo.class);
buildHCRProvider = appendMongoInfo(buildHCRProvider, mongo.getConnection());
- buildHCRProvider.setStatus(Status.UP);
+ buildHCRProvider.setState(State.UP);
MongoIterable collections = mongo.getTheClient().getDatabase(mongo.getConnection().getDatabase())
.listCollectionNames();
log.info("listCollectionNames is null: {}", collections == null);
@@ -74,7 +74,7 @@ public class GeoportalHealthCheck implements HealthCheck {
}
return buildHCRProvider.buildHealthCheckResponse();
} catch (Exception e) {
- buildHCRProvider.setStatus(Status.DOWN);
+ buildHCRProvider.setState(State.DOWN);
if (mongo != null) {
MongoConnection connection = null;
try {
diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/check/HealthCheckResponseGeoportalProvider.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/check/HealthCheckResponseGeoportalProvider.java
index 7ec1ac5..a744dad 100644
--- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/check/HealthCheckResponseGeoportalProvider.java
+++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/check/HealthCheckResponseGeoportalProvider.java
@@ -5,7 +5,7 @@ import java.util.Map;
import java.util.Optional;
import org.eclipse.microprofile.health.HealthCheckResponse;
-import org.eclipse.microprofile.health.HealthCheckResponse.Status;
+import org.eclipse.microprofile.health.HealthCheckResponse.State;
import lombok.extern.slf4j.Slf4j;
@@ -20,9 +20,9 @@ import lombok.extern.slf4j.Slf4j;
public class HealthCheckResponseGeoportalProvider {
private String name;
- private Status status;
private Optional