From e433824f46514e6ed863eb6b95c70038331c8c24 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Tue, 24 Nov 2015 12:49:54 +0000
Subject: [PATCH] OPENDJ-2260 OPENDJ-2271 Integration of common audit into the server

---
 opendj-server-legacy/src/main/java/org/opends/server/protocols/http/HTTPConnectionHandler.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/protocols/http/HTTPConnectionHandler.java b/opendj-server-legacy/src/main/java/org/opends/server/protocols/http/HTTPConnectionHandler.java
index aaaef27..ed36968 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/protocols/http/HTTPConnectionHandler.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/protocols/http/HTTPConnectionHandler.java
@@ -36,6 +36,7 @@
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
+
 import java.io.IOException;
 import java.net.InetAddress;
 import java.util.Arrays;
@@ -80,6 +81,7 @@
 import org.opends.server.api.ServerShutdownListener;
 import org.opends.server.api.TrustManagerProvider;
 import org.opends.server.core.DirectoryServer;
+import org.opends.server.core.ServerContext;
 import org.opends.server.extensions.NullKeyManagerProvider;
 import org.opends.server.extensions.NullTrustManagerProvider;
 import org.opends.server.loggers.HTTPAccessLogger;
@@ -162,6 +164,8 @@
   /** The SSL engine configurator is used for obtaining default SSL parameters. */
   private SSLEngineConfigurator sslEngineConfigurator;
 
+  private ServerContext serverContext;
+
   /** Default constructor. It is invoked by reflection to create this {@link ConnectionHandler}. */
   public HTTPConnectionHandler()
   {
@@ -419,9 +423,10 @@
   }
 
   @Override
-  public void initializeConnectionHandler(HTTPConnectionHandlerCfg config)
+  public void initializeConnectionHandler(ServerContext serverContext, HTTPConnectionHandlerCfg config)
       throws ConfigException, InitializationException
   {
+    this.serverContext = serverContext;
     this.enabled = config.isEnabled();
 
     if (friendlyName == null)
@@ -782,7 +787,8 @@
   {
     // Create and deploy the Web app context
     final WebappContext ctx = new WebappContext(servletName);
-    ctx.addServlet(servletName, new HttpFrameworkServlet(new LdapHttpApplication(this))).addMapping(urlPatterns);
+    ctx.addServlet(servletName,
+        new HttpFrameworkServlet(new LdapHttpApplication(serverContext, this))).addMapping(urlPatterns);
     ctx.deploy(this.httpServer);
   }
 

--
Gitblit v1.10.0