diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
index 5e8bb90..a7c9da9 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
@@ -20,6 +20,7 @@
 import java.util.Hashtable;
 
 import org.apache.felix.http.base.internal.AbstractHttpActivator;
+import org.apache.felix.http.jetty.LoadBalancerCustomizerFactory;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceFactory;
@@ -30,6 +31,7 @@
     private JettyService jetty;
 
     private ServiceRegistration<?> metatypeReg;
+    private ServiceRegistration<LoadBalancerCustomizerFactory> loadBalancerCustomizerFactoryReg;
 
     @Override
     protected void doStart() throws Exception
@@ -58,6 +60,29 @@
                 }, properties);
         this.jetty = new JettyService(getBundleContext(), getDispatcherServlet(), getEventDispatcher(), getHttpServiceController());
         this.jetty.start();
+
+        final Dictionary<String, Object> propertiesCustomizer = new Hashtable<String, Object>();
+        propertiesCustomizer.put(Constants.SERVICE_DESCRIPTION, "Load Balancer Customizer Factory for Jetty Http Service");
+        propertiesCustomizer.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
+        loadBalancerCustomizerFactoryReg = this.getBundleContext().registerService(LoadBalancerCustomizerFactory.class,
+                new ServiceFactory<LoadBalancerCustomizerFactory>()
+                {
+
+                    @Override
+                    public LoadBalancerCustomizerFactory getService(final Bundle bundle,
+                            final ServiceRegistration<LoadBalancerCustomizerFactory> registration)
+                    {
+                        return new ForwardedRequestCustomizerFactory();
+                    }
+
+                    @Override
+                    public void ungetService(final Bundle bundle,
+                            final ServiceRegistration<LoadBalancerCustomizerFactory> registration,
+                            final LoadBalancerCustomizerFactory service)
+                    {
+                        // nothing to do
+                    }
+                }, propertiesCustomizer);
     }
 
     @Override
@@ -69,6 +94,12 @@
             metatypeReg.unregister();
             metatypeReg = null;
         }
+        if ( loadBalancerCustomizerFactoryReg != null )
+        {
+            loadBalancerCustomizerFactoryReg.unregister();
+            loadBalancerCustomizerFactoryReg = null;
+        }
+
         super.doStop();
     }
 }
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
index cdf56f0..5e93b11 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
@@ -47,7 +47,6 @@
 import org.eclipse.jetty.security.HashLoginService;
 import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.server.ConnectorStatistics;
-import org.eclipse.jetty.server.ForwardedRequestCustomizer;
 import org.eclipse.jetty.server.HttpConfiguration;
 import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.SecureRequestCustomizer;
@@ -105,6 +104,8 @@
     private BundleTracker bundleTracker;
     private ServiceTracker eventAdmintTracker;
     private ServiceTracker connectorTracker;
+    private ServiceTracker loadBalancerCustomizerTracker;
+    private CustomizerWrapper customizerWrapper;
     private EventAdmin eventAdmin;
 
     public JettyService(final BundleContext context,
@@ -218,6 +219,13 @@
                 this.connectorTracker.close();
                 this.connectorTracker = null;
             }
+            
+            if (this.loadBalancerCustomizerTracker != null)
+            {
+                this.loadBalancerCustomizerTracker.close();
+                this.loadBalancerCustomizerTracker = null;
+            } 
+            
             try
             {
                 this.server.stop();
@@ -276,8 +284,14 @@
             this.server.setHandler(this.parent);
             this.server.start();
 
+            if (this.config.isProxyLoadBalancerConnection()) 
+            {
+                customizerWrapper = new CustomizerWrapper();
+                this.loadBalancerCustomizerTracker = new LoadBalancerCustomizerFactoryTracker(this.context, customizerWrapper);
+                this.loadBalancerCustomizerTracker.open();
+            }
+            
             final StringBuilder message = new StringBuilder("Started Jetty ").append(version).append(" at port(s)");
-
             if (this.config.isUseHttp() && initializeHttp())
             {
                 message.append(" HTTP:").append(this.config.getHttpPort());
@@ -290,7 +304,7 @@
 
             this.connectorTracker = new ConnectorFactoryTracker(this.context, this.server);
             this.connectorTracker.open();
-
+            
             if (this.server.getConnectors() != null && this.server.getConnectors().length > 0)
             {
                 message.append(" on context path ").append(this.config.getContextPath());
@@ -355,11 +369,10 @@
 
         configureConnector(connector, this.config.getHttpPort());
 
-        if (this.config.isProxyLoadBalancerConnection())
+        if (this.config.isProxyLoadBalancerConnection()) 
         {
-            connFactory.getHttpConfiguration().addCustomizer(new ForwardedRequestCustomizer());
+            connFactory.getHttpConfiguration().addCustomizer(customizerWrapper);
         }
-
         return startConnector(connector);
     }
 
@@ -382,11 +395,11 @@
         HttpConfiguration httpConfiguration = connFactory.getHttpConfiguration();
         httpConfiguration.addCustomizer(new SecureRequestCustomizer());
 
-        if (this.config.isProxyLoadBalancerConnection())
+        if (this.config.isProxyLoadBalancerConnection()) 
         {
-            httpConfiguration.addCustomizer(new ForwardedRequestCustomizer());
+            httpConfiguration.addCustomizer(customizerWrapper);
         }
-
+        
         configureConnector(connector, this.config.getHttpsPort());
         return startConnector(connector);
     }
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/package-info.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/package-info.java
index 148afa2..77d7dfe 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/package-info.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/package-info.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-@Version("2.0")
+@Version("2.1")
 package org.apache.felix.http.jetty;
 
 import org.osgi.annotation.versioning.Version;
\ No newline at end of file
