keycloak-uncached

Details

diff --git a/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/PaxWebIntegrationService.java b/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/PaxWebIntegrationService.java
index 35f5d9f..ca5c7c4 100644
--- a/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/PaxWebIntegrationService.java
+++ b/adapters/oidc/fuse7/jetty94/src/main/java/org/keycloak/adapters/osgi/jetty94/PaxWebIntegrationService.java
@@ -86,6 +86,9 @@ public class PaxWebIntegrationService {
         return httpContext;
     }
 
+    public void setHttpContext(HttpContext httpContext) {
+        this.httpContext = httpContext;
+    }
 
     public void start() {
         ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() {
@@ -115,7 +118,9 @@ public class PaxWebIntegrationService {
 
     protected WebContainer addingWebContainerCallback(ServiceReference webContainerServiceReference) {
         WebContainer service = (WebContainer) bundleContext.getService(webContainerServiceReference);
-        httpContext = service.createDefaultHttpContext();
+        if (httpContext == null) {
+            httpContext = service.createDefaultHttpContext();
+        }
 
         addJettyWebXml(service);
 
diff --git a/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/PaxWebIntegrationService.java b/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/PaxWebIntegrationService.java
index 8c0ad20..89699d6 100644
--- a/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/PaxWebIntegrationService.java
+++ b/adapters/oidc/fuse7/undertow/src/main/java/org/keycloak/adapters/osgi/undertow/PaxWebIntegrationService.java
@@ -70,6 +70,9 @@ public class PaxWebIntegrationService {
         return httpContext;
     }
 
+    public void setHttpContext(HttpContext httpContext) {
+        this.httpContext = httpContext;
+    }
 
     public void start() {
         ServiceTrackerCustomizer trackerCustomizer = new ServiceTrackerCustomizer() {
@@ -99,7 +102,9 @@ public class PaxWebIntegrationService {
 
     protected WebContainer addingWebContainerCallback(ServiceReference webContainerServiceReference) {
         WebContainer service = (WebContainer) bundleContext.getService(webContainerServiceReference);
-        httpContext = service.createDefaultHttpContext();
+        if (httpContext == null) {
+            httpContext = service.createDefaultHttpContext();
+        }
 
         if (constraintMappings == null) {
             throw new IllegalStateException("constraintMappings was null!");