diff --git a/dockerize/configuration/logback.xml b/dockerize/configuration/logback.xml index 4583a72..15c5f65 100644 --- a/dockerize/configuration/logback.xml +++ b/dockerize/configuration/logback.xml @@ -5,20 +5,14 @@ - - - + + --> + diff --git a/pom.xml b/pom.xml index 7562439..148f5d9 100644 --- a/pom.xml +++ b/pom.xml @@ -106,6 +106,19 @@ org.glassfish.jersey.containers jersey-container-servlet + + + org.glassfish.jersey.inject + jersey-hk2 + + + + org.gcube.common gxHTTP diff --git a/src/main/java/org/gcube/resourcemanagement/ResourceManager.java b/src/main/java/org/gcube/resourcemanagement/ResourceManager.java index 1ca107c..cd4735a 100644 --- a/src/main/java/org/gcube/resourcemanagement/ResourceManager.java +++ b/src/main/java/org/gcube/resourcemanagement/ResourceManager.java @@ -3,6 +3,7 @@ package org.gcube.resourcemanagement; import org.gcube.common.security.providers.SecretManagerProvider; import org.gcube.smartgears.ApplicationManager; import org.gcube.smartgears.ContextProvider; +import org.gcube.smartgears.configuration.Mode; import org.gcube.smartgears.context.application.ApplicationContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,7 +30,12 @@ public class ResourceManager implements ApplicationManager { @Override public synchronized void onInit() { - String context = SecretManagerProvider.get().getContext(); + if (ContextProvider.get().container().configuration().mode() == Mode.offline) { + logger.debug("Init called in offline mode"); + return; + } + + String context = ""; // SecretManagerProvider.get().getContext(); logger.trace( "\n-------------------------------------------------------\n" @@ -58,6 +64,11 @@ public class ResourceManager implements ApplicationManager { */ @Override public synchronized void onShutdown(){ + if (ContextProvider.get().container().configuration().mode() == Mode.offline) { + logger.debug("Init called in offline mode"); + return; + } + String context = SecretManagerProvider.get().getContext(); logger.trace(