From 957b26ad259e7d897f8ffcf7864ee4b06509b9b9 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Thu, 17 Oct 2024 12:24:18 +0200 Subject: [PATCH] added @RequestScoped --- geoportal-service/pom.xml | 15 ++++++++++----- .../service/rest/GeoportalHealthCheck.java | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/geoportal-service/pom.xml b/geoportal-service/pom.xml index cb19603..3c97e63 100644 --- a/geoportal-service/pom.xml +++ b/geoportal-service/pom.xml @@ -155,17 +155,22 @@ javax.xml.ws jaxws-api test --> - - - - - + + + + + io.smallrye smallrye-health 2.2.6 + + io.smallrye + smallrye-health-extension-api + 2.2.6 + 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 14eb106..caa8bd8 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,15 +11,19 @@ import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.HealthCheckResponseBuilder; import org.eclipse.microprofile.health.Liveness; +import org.eclipse.microprofile.health.Readiness; import org.gcube.application.cms.implementations.ImplementationProvider; import org.gcube.application.geoportal.common.model.configuration.MongoConnection; import org.gcube.application.geoportal.service.model.internal.db.Mongo; import org.gcube.common.scope.api.ScopeProvider; +import org.glassfish.jersey.process.internal.RequestScoped; import com.mongodb.client.MongoIterable; import lombok.extern.slf4j.Slf4j; +@RequestScoped +@Readiness @Path("/health") @Slf4j public class GeoportalHealthCheck implements HealthCheck {