From 0ed363866048182813605f8e7f01acbb526997c5 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 28 Feb 2013 19:48:42 +1100 Subject: [PATCH] 401966 Ensure OSGI WebApp as Service (WebAppContext) can be deployed only through ServiceWebAppProvider --- .../org/eclipse/jetty/osgi/boot/ServiceContextProvider.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java index b7630cb1882..2e36904fc4f 100644 --- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java +++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/ServiceContextProvider.java @@ -94,6 +94,9 @@ public class ServiceContextProvider extends AbstractContextProvider implements S if (context == null || serviceRef == null) return false; + if (context instanceof org.eclipse.jetty.webapp.WebAppContext) + return false; //the ServiceWebAppProvider will deploy it + String watermark = (String)serviceRef.getProperty(OSGiWebappConstants.WATERMARK); if (watermark != null && !"".equals(watermark)) return false; //this service represents a contexthandler that has already been registered as a service by another of our deployers