401966 Ensure OSGI WebApp as Service (WebAppContext) can be deployed only through ServiceWebAppProvider

This commit is contained in:
Jan Bartel 2013-02-28 19:48:42 +11:00
parent ec083b4ecc
commit 0ed3638660
1 changed files with 3 additions and 0 deletions

View File

@ -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