FELIX-4899 : Change service id for http service context
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1680835 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpServiceFilterHandler.java b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpServiceFilterHandler.java
index a2139f3..4055ecd 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpServiceFilterHandler.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpServiceFilterHandler.java
@@ -20,18 +20,18 @@
import org.apache.felix.http.base.internal.context.ExtServletContext;
import org.apache.felix.http.base.internal.runtime.FilterInfo;
+import org.apache.felix.http.base.internal.service.HttpServiceFactory;
/**
* Servlet holder for filters registered through the ext http service.
*/
public final class HttpServiceFilterHandler extends FilterHandler
{
- public HttpServiceFilterHandler(final long contextServiceId,
- final ExtServletContext context,
+ public HttpServiceFilterHandler(final ExtServletContext context,
final FilterInfo filterInfo,
final Filter filter)
{
- super(contextServiceId, context, filterInfo);
+ super(HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID, context, filterInfo);
this.setFilter(filter);
}
}
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpServiceServletHandler.java b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpServiceServletHandler.java
index 92fce74..ec1781c 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpServiceServletHandler.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpServiceServletHandler.java
@@ -20,12 +20,20 @@
import org.apache.felix.http.base.internal.context.ExtServletContext;
import org.apache.felix.http.base.internal.runtime.ServletInfo;
+import org.apache.felix.http.base.internal.service.HttpServiceFactory;
/**
* Servlet handler for servlets registered through the http service.
*/
public final class HttpServiceServletHandler extends ServletHandler
{
+ public HttpServiceServletHandler(final ExtServletContext context,
+ final ServletInfo servletInfo,
+ final Servlet servlet)
+ {
+ this(HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID, context, servletInfo, servlet);
+ }
+
public HttpServiceServletHandler(final long contextServiceId,
final ExtServletContext context,
final ServletInfo servletInfo,
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java
index 3926bae..106526d 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java
@@ -35,6 +35,7 @@
import javax.servlet.http.HttpSessionEvent;
import org.apache.felix.http.base.internal.context.ExtServletContext;
+import org.apache.felix.http.base.internal.service.HttpServiceFactory;
/**
* The session wrapper keeps track of the internal session, manages their attributes
@@ -90,7 +91,7 @@
public static boolean hasSession(final Long contextId, final HttpSession session)
{
- final String sessionId = contextId == null ? "0" : String.valueOf(contextId);
+ final String sessionId = contextId == null ? String.valueOf(HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID) : String.valueOf(contextId);
return session.getAttribute(ATTR_CREATED + sessionId) != null;
}
@@ -144,7 +145,7 @@
{
this.delegate = session;
this.context = context;
- this.sessionId = contextId == null ? "0" : String.valueOf(contextId);
+ this.sessionId = contextId == null ? String.valueOf(HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID) : String.valueOf(contextId);
this.keyPrefix = contextId == null ? null : ATTR_PREFIX + this.sessionId + ".";
if ( this.keyPrefix != null )
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java b/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java
index 26ca121..32e4453 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/registry/PerContextHandlerRegistry.java
@@ -26,6 +26,7 @@
import org.apache.felix.http.base.internal.runtime.ServletContextHelperInfo;
import org.apache.felix.http.base.internal.runtime.ServletInfo;
import org.apache.felix.http.base.internal.runtime.dto.FailedDTOHolder;
+import org.apache.felix.http.base.internal.service.HttpServiceFactory;
import org.osgi.service.http.runtime.dto.ServletContextDTO;
/**
@@ -59,7 +60,7 @@
*/
public PerContextHandlerRegistry()
{
- this.serviceId = 0;
+ this.serviceId = HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID;
this.ranking = Integer.MAX_VALUE;
this.path = "/";
this.prefix = null;
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
index a7f0b61..5551159 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
@@ -40,6 +40,11 @@
public final class HttpServiceFactory
implements ServiceFactory<HttpService>
{
+ public static final String HTTP_SERVICE_CONTEXT_NAME = "Http Service context";
+
+ public static final long HTTP_SERVICE_CONTEXT_SERVICE_ID = -1;
+
+
/**
* Name of the Framework property indicating whether the servlet context
* attributes of the ServletContext objects created for each HttpContext
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/service/PerBundleHttpServiceImpl.java b/http/base/src/main/java/org/apache/felix/http/base/internal/service/PerBundleHttpServiceImpl.java
index 1dc95b2..1146497 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/service/PerBundleHttpServiceImpl.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/service/PerBundleHttpServiceImpl.java
@@ -123,7 +123,7 @@
}
final ExtServletContext httpContext = getServletContext(context);
- final FilterHandler holder = new HttpServiceFilterHandler(0, httpContext, filterInfo, filter);
+ final FilterHandler holder = new HttpServiceFilterHandler(httpContext, filterInfo, filter);
if ( this.sharedHttpService.registerFilter(holder) )
{
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/service/SharedHttpServiceImpl.java b/http/base/src/main/java/org/apache/felix/http/base/internal/service/SharedHttpServiceImpl.java
index 0d9e7df..c24b870 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/service/SharedHttpServiceImpl.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/service/SharedHttpServiceImpl.java
@@ -65,7 +65,7 @@
@Nonnull final Servlet servlet,
@Nonnull final ServletInfo servletInfo) throws ServletException, NamespaceException
{
- final ServletHandler holder = new HttpServiceServletHandler(0, httpContext, servletInfo, servlet);
+ final ServletHandler holder = new HttpServiceServletHandler(httpContext, servletInfo, servlet);
synchronized (this.aliasMap)
{
@@ -93,7 +93,7 @@
}
final Servlet s = holder.getServlet();
- this.handlerRegistry.removeServlet(0, holder.getServletInfo(), true);
+ this.handlerRegistry.removeServlet(HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID, holder.getServletInfo(), true);
return s;
}
}
@@ -110,7 +110,7 @@
final Map.Entry<String, ServletHandler> entry = i.next();
if (entry.getValue().getServlet() == servlet)
{
- this.handlerRegistry.removeServlet(0, entry.getValue().getServletInfo(), destroy);
+ this.handlerRegistry.removeServlet(HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID, entry.getValue().getServletInfo(), destroy);
i.remove();
break;
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/util/InternalIdFactory.java b/http/base/src/main/java/org/apache/felix/http/base/internal/util/InternalIdFactory.java
index 4d432d5..0ab73eb 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/util/InternalIdFactory.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/util/InternalIdFactory.java
@@ -29,7 +29,8 @@
{
INSTANCE;
- private final AtomicLong idCounter = new AtomicLong();
+ /** -1 is reserved for the http service servlet context. */
+ private final AtomicLong idCounter = new AtomicLong(-1);
public long next()
{
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java b/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java
index 9fe4628..1aadbfc 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/WhiteboardManager.java
@@ -740,7 +740,6 @@
return handlers;
}
- private static final String HTTP_SERVICE_CONTEXT_NAME = "Http Service context";
public RegistryRuntime getRuntime(final HandlerRegistry registry)
{
@@ -748,7 +747,9 @@
final Collection<ServletContextDTO> contextDTOs = new ArrayList<ServletContextDTO>();
// add the context for the http service
- final ServletContextHelperInfo info = new ServletContextHelperInfo(Integer.MAX_VALUE, 0, HTTP_SERVICE_CONTEXT_NAME, "/", null);
+ final ServletContextHelperInfo info = new ServletContextHelperInfo(Integer.MAX_VALUE,
+ HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID,
+ HttpServiceFactory.HTTP_SERVICE_CONTEXT_NAME, "/", null);
final ServletContextDTO dto = ServletContextDTOBuilder.build(info, webContext, -1);
if ( registry.getRuntime(dto, failedDTOHolder) )
{
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java
index d53a195..3eefc72 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/handler/FilterHandlerTest.java
@@ -246,7 +246,7 @@
initParams = Collections.emptyMap();
}
final FilterInfo info = new FilterInfo(null, pattern, ranking, initParams);
- return new HttpServiceFilterHandler(0, this.context, info, this.filter);
+ return new HttpServiceFilterHandler(this.context, info, this.filter);
}
private HttpServletRequest createServletRequest()
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpServiceServletHandlerTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpServiceServletHandlerTest.java
index ac0c519..afe7b87 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpServiceServletHandlerTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/handler/HttpServiceServletHandlerTest.java
@@ -221,6 +221,6 @@
map = Collections.emptyMap();
}
final ServletInfo info = new ServletInfo(null, alias, 0, map);
- return new HttpServiceServletHandler(3, this.context, info, this.servlet);
+ return new HttpServiceServletHandler(this.context, info, this.servlet);
}
}
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/registry/ErrorPageRegistryTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/registry/ErrorPageRegistryTest.java
index 0228b7e..0ed605e 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/registry/ErrorPageRegistryTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/registry/ErrorPageRegistryTest.java
@@ -17,6 +17,7 @@
package org.apache.felix.http.base.internal.registry;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -26,7 +27,9 @@
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.util.HashSet;
import java.util.Map;
+import java.util.Set;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
@@ -45,13 +48,12 @@
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
import org.osgi.service.http.runtime.dto.DTOConstants;
+import org.osgi.service.http.runtime.dto.FailedErrorPageDTO;
import org.osgi.service.http.runtime.dto.ServletContextDTO;
import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
public class ErrorPageRegistryTest {
- private final ErrorPageRegistry reg = new ErrorPageRegistry();
-
private void assertEmpty(final ServletContextDTO dto, final FailedDTOHolder holder)
{
assertNull(dto.servletDTOs);
@@ -70,6 +72,8 @@
@Test public void testSingleErrorPage() throws InvalidSyntaxException, ServletException
{
+ final ErrorPageRegistry reg = new ErrorPageRegistry();
+
final FailedDTOHolder holder = new FailedDTOHolder();
final ServletContextDTO dto = new ServletContextDTO();
@@ -127,6 +131,8 @@
@Test public void testSimpleHiding() throws InvalidSyntaxException, ServletException
{
+ final ErrorPageRegistry reg = new ErrorPageRegistry();
+
final FailedDTOHolder holder = new FailedDTOHolder();
final ServletContextDTO dto = new ServletContextDTO();
@@ -223,6 +229,88 @@
assertEmpty(dto, holder);
}
+ @Test public void testRangeRegistration() throws InvalidSyntaxException
+ {
+ final ErrorPageRegistry reg = new ErrorPageRegistry();
+ final FailedDTOHolder holder = new FailedDTOHolder();
+ final ServletContextDTO dto = new ServletContextDTO();
+
+ final ServletHandler handler4 = createServletHandler(1L, 0, "4xx");
+ final ServletHandler handler5 = createServletHandler(2L, 0, "5xx");
+
+ reg.addServlet(handler4);
+ reg.addServlet(handler5);
+
+ // check DTO
+ reg.getRuntimeInfo(dto, holder.failedErrorPageDTOs);
+
+ assertTrue(holder.failedErrorPageDTOs.isEmpty());
+ assertEquals(2, dto.errorPageDTOs.length);
+ assertEquals(100, dto.errorPageDTOs[0].errorCodes.length);
+ final Set<Long> codes4 = new HashSet<Long>();
+ for(final long c : dto.errorPageDTOs[0].errorCodes)
+ {
+ assertTrue(c >= 400 && c < 500);
+ codes4.add(c);
+ }
+ assertEquals(100, codes4.size());
+ assertEquals(100, dto.errorPageDTOs[1].errorCodes.length);
+ final Set<Long> codes5 = new HashSet<Long>();
+ for(final long c : dto.errorPageDTOs[1].errorCodes)
+ {
+ assertTrue(c >= 500 && c < 600);
+ codes5.add(c);
+ }
+ assertEquals(100, codes5.size());
+ }
+
+ @Test public void testRangeRegistrationOverlay() throws InvalidSyntaxException
+ {
+ final ErrorPageRegistry reg = new ErrorPageRegistry();
+ final FailedDTOHolder holder = new FailedDTOHolder();
+ final ServletContextDTO dto = new ServletContextDTO();
+
+ final ServletHandler handler4 = createServletHandler(1L, 0, "4xx");
+ final ServletHandler handler = createServletHandler(2L, 10, "404", "403");
+
+ reg.addServlet(handler4);
+ reg.addServlet(handler);
+
+ // check DTO
+ reg.getRuntimeInfo(dto, holder.failedErrorPageDTOs);
+
+ assertEquals(1, holder.failedErrorPageDTOs.size());
+ assertEquals(2, dto.errorPageDTOs.length);
+ assertEquals(98, dto.errorPageDTOs[0].errorCodes.length);
+ final Set<Long> codes4 = new HashSet<Long>();
+ for(final long c : dto.errorPageDTOs[0].errorCodes)
+ {
+ assertTrue(c >= 400 && c < 500);
+ codes4.add(c);
+ }
+ assertEquals(98, codes4.size());
+ assertFalse(codes4.contains(404L));
+ assertFalse(codes4.contains(403L));
+ assertEquals(2, dto.errorPageDTOs[1].errorCodes.length);
+ final Set<Long> codes = new HashSet<Long>();
+ for(final long c : dto.errorPageDTOs[1].errorCodes)
+ {
+ assertTrue(c >= 403 && c < 405);
+ codes.add(c);
+ }
+ assertEquals(2, codes.size());
+
+ final FailedErrorPageDTO fep = holder.failedErrorPageDTOs.iterator().next();
+ assertEquals(2, fep.errorCodes.length);
+ codes.clear();
+ for(final long c : fep.errorCodes)
+ {
+ assertTrue(c >= 403 && c < 405);
+ codes.add(c);
+ }
+ assertEquals(2, codes.size());
+ }
+
private static ServletInfo createServletInfo(final long id, final int ranking, final String... codes) throws InvalidSyntaxException
{
final BundleContext bCtx = mock(BundleContext.class);
@@ -248,6 +336,6 @@
final ExtServletContext ctx = mock(ExtServletContext.class);
final Servlet servlet = mock(Servlet.class);
- return new HttpServiceServletHandler(7, ctx, si, servlet);
+ return new HttpServiceServletHandler(ctx, si, servlet);
}
}
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/registry/FilterRegistryTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/registry/FilterRegistryTest.java
index e74146c..702e007 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/registry/FilterRegistryTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/registry/FilterRegistryTest.java
@@ -147,6 +147,6 @@
final ExtServletContext ctx = mock(ExtServletContext.class);
final Filter filter = mock(Filter.class);
- return new HttpServiceFilterHandler(7, ctx, si, filter);
+ return new HttpServiceFilterHandler(ctx, si, filter);
}
}
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/registry/HandlerRegistryTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/registry/HandlerRegistryTest.java
index d3f6fc7..a9530ed 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/registry/HandlerRegistryTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/registry/HandlerRegistryTest.java
@@ -29,6 +29,7 @@
import org.apache.felix.http.base.internal.handler.ServletHandler;
import org.apache.felix.http.base.internal.runtime.ServletInfo;
import org.apache.felix.http.base.internal.runtime.dto.FailedDTOHolder;
+import org.apache.felix.http.base.internal.service.HttpServiceFactory;
import org.junit.Test;
import org.mockito.Mockito;
import org.osgi.service.http.runtime.dto.ServletContextDTO;
@@ -43,6 +44,8 @@
{
final FailedDTOHolder holder = new FailedDTOHolder();
final ServletContextDTO dto = new ServletContextDTO();
+ dto.serviceId = HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID;
+
assertFalse(registry.getRuntime(dto, holder));
registry.init();
@@ -60,11 +63,12 @@
final FailedDTOHolder holder = new FailedDTOHolder();
final ServletContextDTO dto = new ServletContextDTO();
+ dto.serviceId = HttpServiceFactory.HTTP_SERVICE_CONTEXT_SERVICE_ID;
dto.servletDTOs = new ServletDTO[0];
Servlet servlet = Mockito.mock(Servlet.class);
final ServletInfo info = new ServletInfo("foo", "/foo", 0, Collections.EMPTY_MAP);
- ServletHandler handler = new HttpServiceServletHandler(0, null, info, servlet);
+ ServletHandler handler = new HttpServiceServletHandler(null, info, servlet);
assertTrue(registry.getRuntime(dto, holder));
assertEquals("Precondition", 0, dto.servletDTOs.length);
@@ -76,13 +80,13 @@
assertEquals(info.getServiceId(), dto.servletDTOs[0].serviceId);
final ServletInfo info2 = new ServletInfo("bar", "/bar", 0, Collections.EMPTY_MAP);
- ServletHandler handler2 = new HttpServiceServletHandler(0, null, info2, Mockito.mock(Servlet.class));
+ ServletHandler handler2 = new HttpServiceServletHandler(null, info2, Mockito.mock(Servlet.class));
registry.addServlet(handler2);
assertTrue(registry.getRuntime(dto, holder));
assertEquals(2, dto.servletDTOs.length);
final ServletInfo info3 = new ServletInfo("zar", "/foo", 0, Collections.EMPTY_MAP);
- ServletHandler handler3 = new HttpServiceServletHandler(0, null,info3, Mockito.mock(Servlet.class));
+ ServletHandler handler3 = new HttpServiceServletHandler(null,info3, Mockito.mock(Servlet.class));
registry.addServlet(handler3);
assertTrue(registry.getRuntime(dto, holder));
assertEquals(2, dto.servletDTOs.length);
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/registry/ServletRegistryTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/registry/ServletRegistryTest.java
index f4ffa15..e1654f3 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/registry/ServletRegistryTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/registry/ServletRegistryTest.java
@@ -284,6 +284,6 @@
final ExtServletContext ctx = mock(ExtServletContext.class);
final Servlet servlet = mock(Servlet.class);
- return new HttpServiceServletHandler(7, ctx, si, servlet);
+ return new HttpServiceServletHandler(ctx, si, servlet);
}
}
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/runtime/WhiteboardServiceHelper.java b/http/base/src/test/java/org/apache/felix/http/base/internal/runtime/WhiteboardServiceHelper.java
index 5c39582..220bc32 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/runtime/WhiteboardServiceHelper.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/runtime/WhiteboardServiceHelper.java
@@ -57,7 +57,7 @@
Long serviceId)
{
FilterInfo filterInfo = createFilterInfo(identifier, serviceId);
- return new HttpServiceFilterHandler(0, context, filterInfo, mock(Filter.class));
+ return new HttpServiceFilterHandler(context, filterInfo, mock(Filter.class));
}
private static FilterInfo createFilterInfo(String identifier,
@@ -114,7 +114,7 @@
ServletInfo servletInfo = createServletInfo(identifier, serviceId);
Servlet servlet = mock(Servlet.class);
when(servlet.getServletInfo()).thenReturn("info_" + identifier);
- final ServletHandler h = new HttpServiceServletHandler(contextServiceId, context, servletInfo, servlet);
+ final ServletHandler h = new HttpServiceServletHandler(context, servletInfo, servlet);
return h;
}