FELIX-2788 Allow for the configuration of shared ServletContext attributes. Currently configuration is static using a framework property -- org.apache.felix.http.shared_servlet_context_attributes -- which when set to true causes servlet context attributes to be shared amongst all servlet contexts as well as the servlet container's servlet context.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1062830 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/HttpServiceController.java b/http/base/src/main/java/org/apache/felix/http/base/internal/HttpServiceController.java
index 38cb093..7abbedd 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/HttpServiceController.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/HttpServiceController.java
@@ -35,6 +35,26 @@
public final class HttpServiceController
{
+ /**
+ * Name of the Framework property indicating whether the servlet context
+ * attributes of the ServletContext objects created for each HttpContext
+ * used to register servlets and resources share their attributes or not.
+ * By default (if this property is not specified or it's value is not
+ * <code>true</code> (case-insensitive)) servlet context attributes are not
+ * shared. To have servlet context attributes shared amongst servlet context
+ * and also with the ServletContext provided by the servlet container ensure
+ * setting the property as follows:
+ * <pre>
+ * org.apache.felix.http.shared_servlet_context_attributes = true
+ * </pre>
+ * <p>
+ * <b>WARNING:</b> Only set this property if absolutely needed (for example
+ * you implement an HttpSessionListener and want to access servlet context
+ * attributes of the ServletContext to which the HttpSession is linked).
+ * Otherwise leave this property unset.
+ */
+ private static final String FELIX_HTTP_SHARED_SERVLET_CONTEXT_ATTRIBUTES = "org.apache.felix.http.shared_servlet_context_attributes";
+
private final BundleContext bundleContext;
private final HandlerRegistry registry;
private final Dispatcher dispatcher;
@@ -44,6 +64,7 @@
private final ServletRequestAttributeListenerManager requestAttributeListener;
private final HttpSessionListenerManager sessionListener;
private final HttpSessionAttributeListenerManager sessionAttributeListener;
+ private final boolean sharedContextAttributes;
private ServiceRegistration serviceReg;
public HttpServiceController(BundleContext bundleContext)
@@ -57,6 +78,7 @@
this.requestAttributeListener = new ServletRequestAttributeListenerManager(bundleContext);
this.sessionListener = new HttpSessionListenerManager(bundleContext);
this.sessionAttributeListener = new HttpSessionAttributeListenerManager(bundleContext);
+ this.sharedContextAttributes = getBoolean(FELIX_HTTP_SHARED_SERVLET_CONTEXT_ATTRIBUTES);
}
public Dispatcher getDispatcher()
@@ -107,7 +129,8 @@
this.sessionListener.open();
this.sessionAttributeListener.open();
- HttpServiceFactory factory = new HttpServiceFactory(servletContext, this.registry, this.contextAttributeListener);
+ HttpServiceFactory factory = new HttpServiceFactory(servletContext, this.registry,
+ this.contextAttributeListener, this.sharedContextAttributes);
String[] ifaces = new String[] { HttpService.class.getName(), ExtHttpService.class.getName() };
this.serviceReg = this.bundleContext.registerService(ifaces, factory, this.serviceProps);
}
@@ -131,4 +154,10 @@
this.serviceReg = null;
}
}
+
+ private boolean getBoolean(final String property)
+ {
+ String prop = this.bundleContext.getProperty(property);
+ return (prop != null) ? Boolean.valueOf(prop).booleanValue() : false;
+ }
}
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
index 18977ab..8f3aece 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
@@ -50,13 +50,13 @@
private final ServletContextAttributeListener attributeListener;
public ServletContextImpl(Bundle bundle, ServletContext context, HttpContext httpContext,
- ServletContextAttributeListener attributeListener)
+ ServletContextAttributeListener attributeListener, boolean sharedAttributes)
{
this.bundle = bundle;
this.context = context;
this.httpContext = httpContext;
- this.attributes = new ConcurrentHashMap<String, Object>();
this.attributeListener = attributeListener;
+ this.attributes = sharedAttributes ? null : new ConcurrentHashMap<String, Object>();
}
public String getContextPath()
@@ -149,12 +149,13 @@
public Object getAttribute(String name)
{
- return this.attributes.get(name);
+ return (this.attributes != null) ? this.attributes.get(name) : this.context.getAttribute(name);
}
public Enumeration getAttributeNames()
{
- return Collections.enumeration(this.attributes.keySet());
+ return (this.attributes != null) ? Collections.enumeration(this.attributes.keySet()) : this.context
+ .getAttributeNames();
}
public void setAttribute(String name, Object value)
@@ -165,7 +166,17 @@
}
else if (name != null)
{
- Object oldValue = this.attributes.put(name, value);
+ Object oldValue;
+ if (this.attributes != null)
+ {
+ oldValue = this.attributes.put(name, value);
+ }
+ else
+ {
+ oldValue = this.context.getAttribute(name);
+ this.context.setAttribute(name, value);
+ }
+
if (oldValue == null)
{
attributeListener.attributeAdded(new ServletContextAttributeEvent(this, name, value));
@@ -179,7 +190,17 @@
public void removeAttribute(String name)
{
- Object oldValue = this.attributes.remove(name);
+ Object oldValue;
+ if (this.attributes != null)
+ {
+ oldValue = this.attributes.remove(name);
+ }
+ else
+ {
+ oldValue = this.context.getAttribute(name);
+ this.context.removeAttribute(name);
+ }
+
if (oldValue != null)
{
attributeListener.attributeRemoved(new ServletContextAttributeEvent(this, name, oldValue));
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextManager.java b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextManager.java
index 835d41e..2ab7919 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextManager.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextManager.java
@@ -31,14 +31,16 @@
private final ServletContext context;
private final ServletContextAttributeListener attributeListener;
private final Map<HttpContext, ExtServletContext> contextMap;
+ private final boolean sharedAttributes;
public ServletContextManager(Bundle bundle, ServletContext context,
- ServletContextAttributeListener attributeListener)
+ ServletContextAttributeListener attributeListener, boolean sharedAttributes)
{
this.bundle = bundle;
this.context = context;
this.attributeListener = attributeListener;
this.contextMap = new HashMap<HttpContext, ExtServletContext>();
+ this.sharedAttributes = sharedAttributes;
}
public ExtServletContext getServletContext(HttpContext httpContext)
@@ -55,7 +57,8 @@
private ExtServletContext addServletContext(HttpContext httpContext)
{
- ExtServletContext context = new ServletContextImpl(this.bundle, this.context, httpContext, attributeListener);
+ ExtServletContext context = new ServletContextImpl(this.bundle, this.context, httpContext, attributeListener,
+ sharedAttributes);
this.contextMap.put(httpContext, context);
return context;
}
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 0e4e3c8..b27646b 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
@@ -30,18 +30,21 @@
private final ServletContext context;
private final ServletContextAttributeListener attributeListener;
private final HandlerRegistry handlerRegistry;
+ private final boolean sharedContextAttributes;
public HttpServiceFactory(ServletContext context, HandlerRegistry handlerRegistry,
- ServletContextAttributeListener attributeListener)
+ ServletContextAttributeListener attributeListener, boolean sharedContextAttributes)
{
this.context = context;
this.attributeListener = attributeListener;
this.handlerRegistry = handlerRegistry;
+ this.sharedContextAttributes = sharedContextAttributes;
}
public Object getService(Bundle bundle, ServiceRegistration reg)
{
- return new HttpServiceImpl(bundle, this.context, this.handlerRegistry, attributeListener);
+ return new HttpServiceImpl(bundle, this.context, this.handlerRegistry, this.attributeListener,
+ this.sharedContextAttributes);
}
public void ungetService(Bundle bundle, ServiceRegistration reg, Object service)
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
index 946d21c..b0e586b 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
@@ -39,13 +39,15 @@
private final HashSet<Filter> localFilters;
private final ServletContextManager contextManager;
- public HttpServiceImpl(Bundle bundle, ServletContext context, HandlerRegistry handlerRegistry, ServletContextAttributeListener servletAttributeListener)
+ public HttpServiceImpl(Bundle bundle, ServletContext context, HandlerRegistry handlerRegistry,
+ ServletContextAttributeListener servletAttributeListener, boolean sharedContextAttributes)
{
this.bundle = bundle;
this.handlerRegistry = handlerRegistry;
this.localServlets = new HashSet<Servlet>();
this.localFilters = new HashSet<Filter>();
- this.contextManager = new ServletContextManager(this.bundle, context, servletAttributeListener);
+ this.contextManager = new ServletContextManager(this.bundle, context, servletAttributeListener,
+ sharedContextAttributes);
}
private ExtServletContext getServletContext(HttpContext context)
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextImplTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextImplTest.java
index a31fa6e..eb8ff65 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextImplTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextImplTest.java
@@ -25,10 +25,12 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
-
+import java.io.InputStream;
import java.net.URL;
import java.util.*;
@@ -46,7 +48,7 @@
ServletContext globalContext = Mockito.mock(ServletContext.class);
this.httpContext = Mockito.mock(HttpContext.class);
this.listener = new AttributeListener();
- this.context = new ServletContextImpl(this.bundle, globalContext, this.httpContext, this.listener);
+ this.context = new ServletContextImpl(this.bundle, globalContext, this.httpContext, this.listener, false);
}
@Test
@@ -149,6 +151,230 @@
}
@Test
+ public void testGetSharedAttribute()
+ {
+ ServletContext globalContext = new MockServletContext();
+ ServletContext ctx1 = new ServletContextImpl(bundle, globalContext, httpContext, listener, true);
+ ServletContext ctx2 = new ServletContextImpl(bundle, globalContext, httpContext, listener, true);
+
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertNull(ctx2.getAttribute("key1"));
+ Assert.assertNull(globalContext.getAttribute("key1"));
+
+ // Operations on ctx1 and check results
+
+ ctx1.setAttribute("key1", "value1");
+ this.listener.checkAdded("key1", "value1");
+ Assert.assertEquals("value1", ctx1.getAttribute("key1"));
+ Assert.assertEquals("value1", ctx2.getAttribute("key1"));
+ Assert.assertEquals("value1", globalContext.getAttribute("key1"));
+
+ ctx1.removeAttribute("key1");
+ this.listener.checkRemoved("key1", "value1");
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertNull(ctx2.getAttribute("key1"));
+ Assert.assertNull(globalContext.getAttribute("key1"));
+
+ ctx1.setAttribute("key1", null);
+ this.listener.checkNull();
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertNull(ctx2.getAttribute("key1"));
+ Assert.assertNull(globalContext.getAttribute("key1"));
+
+ ctx1.setAttribute("key1", "value1");
+ this.listener.checkAdded("key1", "value1");
+ Assert.assertEquals("value1", ctx1.getAttribute("key1"));
+ Assert.assertEquals("value1", ctx2.getAttribute("key1"));
+ Assert.assertEquals("value1", globalContext.getAttribute("key1"));
+
+ ctx1.setAttribute("key1", "newValue");
+ this.listener.checkReplaced("key1", "value1");
+ Assert.assertEquals("newValue", ctx1.getAttribute("key1"));
+ Assert.assertEquals("newValue", ctx2.getAttribute("key1"));
+ Assert.assertEquals("newValue", globalContext.getAttribute("key1"));
+
+ ctx1.removeAttribute("key1");
+
+ // Operations on ctx2 and check results
+
+ ctx2.setAttribute("key1", "value1");
+ this.listener.checkAdded("key1", "value1");
+ Assert.assertEquals("value1", ctx1.getAttribute("key1"));
+ Assert.assertEquals("value1", ctx2.getAttribute("key1"));
+ Assert.assertEquals("value1", globalContext.getAttribute("key1"));
+
+ ctx2.removeAttribute("key1");
+ this.listener.checkRemoved("key1", "value1");
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertNull(ctx2.getAttribute("key1"));
+ Assert.assertNull(globalContext.getAttribute("key1"));
+
+ ctx2.setAttribute("key1", null);
+ this.listener.checkNull();
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertNull(ctx2.getAttribute("key1"));
+ Assert.assertNull(globalContext.getAttribute("key1"));
+
+ ctx2.setAttribute("key1", "value1");
+ this.listener.checkAdded("key1", "value1");
+ Assert.assertEquals("value1", ctx1.getAttribute("key1"));
+ Assert.assertEquals("value1", ctx2.getAttribute("key1"));
+ Assert.assertEquals("value1", globalContext.getAttribute("key1"));
+
+ ctx2.setAttribute("key1", "newValue");
+ this.listener.checkReplaced("key1", "value1");
+ Assert.assertEquals("newValue", ctx1.getAttribute("key1"));
+ Assert.assertEquals("newValue", ctx2.getAttribute("key1"));
+ Assert.assertEquals("newValue", globalContext.getAttribute("key1"));
+
+ ctx2.removeAttribute("key1");
+
+ // Operations on globalContext and check results
+
+ globalContext.setAttribute("key1", "value1");
+ Assert.assertEquals("value1", ctx1.getAttribute("key1"));
+ Assert.assertEquals("value1", ctx2.getAttribute("key1"));
+ Assert.assertEquals("value1", globalContext.getAttribute("key1"));
+
+ globalContext.removeAttribute("key1");
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertNull(ctx2.getAttribute("key1"));
+ Assert.assertNull(globalContext.getAttribute("key1"));
+
+ globalContext.setAttribute("key1", null);
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertNull(ctx2.getAttribute("key1"));
+ Assert.assertNull(globalContext.getAttribute("key1"));
+
+ globalContext.setAttribute("key1", "value1");
+ Assert.assertEquals("value1", ctx1.getAttribute("key1"));
+ Assert.assertEquals("value1", ctx2.getAttribute("key1"));
+ Assert.assertEquals("value1", globalContext.getAttribute("key1"));
+
+ globalContext.setAttribute("key1", "newValue");
+ Assert.assertEquals("newValue", ctx1.getAttribute("key1"));
+ Assert.assertEquals("newValue", ctx2.getAttribute("key1"));
+ Assert.assertEquals("newValue", globalContext.getAttribute("key1"));
+
+ globalContext.removeAttribute("key1");
+ }
+
+ @Test
+ public void testGetSharedAttributeNames()
+ {
+ ServletContext globalContext = new MockServletContext();
+ ServletContext ctx1 = new ServletContextImpl(bundle, globalContext, httpContext, listener, true);
+ ServletContext ctx2 = new ServletContextImpl(bundle, globalContext, httpContext, listener, true);
+
+ Enumeration e = ctx1.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertFalse(e.hasMoreElements());
+ e = ctx2.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertFalse(e.hasMoreElements());
+ e = globalContext.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertFalse(e.hasMoreElements());
+
+ ctx1.setAttribute("key1", "value1");
+ this.listener.checkAdded("key1", "value1");
+ e = ctx1.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertTrue(e.hasMoreElements());
+ Assert.assertEquals("key1", e.nextElement());
+ Assert.assertFalse(e.hasMoreElements());
+ e = ctx2.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertTrue(e.hasMoreElements());
+ Assert.assertEquals("key1", e.nextElement());
+ Assert.assertFalse(e.hasMoreElements());
+ e = globalContext.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertTrue(e.hasMoreElements());
+ Assert.assertEquals("key1", e.nextElement());
+ Assert.assertFalse(e.hasMoreElements());
+ }
+
+
+ @Test
+ public void testGetUnsharedAttribute()
+ {
+ ServletContext globalContext = new MockServletContext();
+ ServletContext ctx1 = new ServletContextImpl(bundle, globalContext, httpContext, listener, false);
+ ServletContext ctx2 = new ServletContextImpl(bundle, globalContext, httpContext, listener, false);
+
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertNull(ctx2.getAttribute("key1"));
+ Assert.assertNull(globalContext.getAttribute("key1"));
+
+ // Operations on ctx1 and check results
+
+ ctx2.setAttribute("key1", "ctx2_private_value");
+ globalContext.setAttribute("key1", "globalContext_private_value");
+ ctx1.setAttribute("key1", "value1");
+ this.listener.checkAdded("key1", "value1");
+ Assert.assertEquals("value1", ctx1.getAttribute("key1"));
+ Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
+ Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));
+
+ ctx1.removeAttribute("key1");
+ this.listener.checkRemoved("key1", "value1");
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
+ Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));
+
+ ctx1.setAttribute("key1", null);
+ this.listener.checkNull();
+ Assert.assertNull(ctx1.getAttribute("key1"));
+ Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
+ Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));
+
+ ctx1.setAttribute("key1", "value1");
+ this.listener.checkAdded("key1", "value1");
+ Assert.assertEquals("value1", ctx1.getAttribute("key1"));
+ Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
+ Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));
+
+ ctx1.setAttribute("key1", "newValue");
+ this.listener.checkReplaced("key1", "value1");
+ Assert.assertEquals("newValue", ctx1.getAttribute("key1"));
+ Assert.assertEquals("ctx2_private_value", ctx2.getAttribute("key1"));
+ Assert.assertEquals("globalContext_private_value", globalContext.getAttribute("key1"));
+ }
+
+ @Test
+ public void testGetUnsharedAttributeNames()
+ {
+ ServletContext globalContext = new MockServletContext();
+ ServletContext ctx1 = new ServletContextImpl(bundle, globalContext, httpContext, listener, false);
+ ServletContext ctx2 = new ServletContextImpl(bundle, globalContext, httpContext, listener, false);
+
+ Enumeration e = ctx1.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertFalse(e.hasMoreElements());
+ e = ctx2.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertFalse(e.hasMoreElements());
+ e = globalContext.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertFalse(e.hasMoreElements());
+
+ ctx1.setAttribute("key1", "value1");
+ this.listener.checkAdded("key1", "value1");
+ e = ctx1.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertTrue(e.hasMoreElements());
+ Assert.assertEquals("key1", e.nextElement());
+ Assert.assertFalse(e.hasMoreElements());
+ e = ctx2.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertFalse(e.hasMoreElements());
+ e = globalContext.getAttributeNames();
+ Assert.assertNotNull(e);
+ Assert.assertFalse(e.hasMoreElements());
+ }
+
+ @Test
public void testGetServlet()
throws Exception
{
@@ -260,4 +486,138 @@
}
}
}
+
+ private class MockServletContext implements ServletContext {
+
+ private Dictionary attributes = new Hashtable();
+
+ public Object getAttribute(String name)
+ {
+ return attributes.get(name);
+ }
+
+ public Enumeration getAttributeNames()
+ {
+ return attributes.keys();
+ }
+
+ public void setAttribute(String name, Object object)
+ {
+ if (object != null)
+ {
+ attributes.put(name, object);
+ }
+ else
+ {
+ removeAttribute(name);
+ }
+ }
+
+ public void removeAttribute(String name)
+ {
+ attributes.remove(name);
+ }
+
+ public String getContextPath()
+ {
+ return null;
+ }
+
+ public ServletContext getContext(String uripath)
+ {
+ return null;
+ }
+
+ public int getMajorVersion()
+ {
+ return 0;
+ }
+
+ public int getMinorVersion()
+ {
+ return 0;
+ }
+
+ public String getMimeType(String file)
+ {
+ return null;
+ }
+
+ public Set getResourcePaths(String path)
+ {
+ return null;
+ }
+
+ public URL getResource(String path)
+ {
+ return null;
+ }
+
+ public InputStream getResourceAsStream(String path)
+ {
+ return null;
+ }
+
+ public RequestDispatcher getRequestDispatcher(String path)
+ {
+ return null;
+ }
+
+ public RequestDispatcher getNamedDispatcher(String name)
+ {
+ return null;
+ }
+
+ public Servlet getServlet(String name)
+ {
+ return null;
+ }
+
+ public Enumeration getServlets()
+ {
+ return null;
+ }
+
+ public Enumeration getServletNames()
+ {
+ return null;
+ }
+
+ public void log(String msg)
+ {
+ }
+
+ public void log(Exception exception, String msg)
+ {
+ }
+
+ public void log(String message, Throwable throwable)
+ {
+ }
+
+ public String getRealPath(String path)
+ {
+ return null;
+ }
+
+ public String getServerInfo()
+ {
+ return null;
+ }
+
+ public String getInitParameter(String name)
+ {
+ return null;
+ }
+
+ public Enumeration getInitParameterNames()
+ {
+ return null;
+ }
+
+ public String getServletContextName()
+ {
+ return null;
+ }
+ }
}
diff --git a/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextManagerTest.java b/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextManagerTest.java
index f64d42e..5f99e89 100644
--- a/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextManagerTest.java
+++ b/http/base/src/test/java/org/apache/felix/http/base/internal/context/ServletContextManagerTest.java
@@ -34,7 +34,7 @@
{
Bundle bundle = Mockito.mock(Bundle.class);
ServletContext globalContext = Mockito.mock(ServletContext.class);
- this.manager = new ServletContextManager(bundle, globalContext, null);
+ this.manager = new ServletContextManager(bundle, globalContext, null, false);
}
@Test