code: public void publish(final WebApp webApp) {
  		NullArgumentException.validateNotNull(webApp, "Web app");
  		LOG.debug("Publishing web application [{}]", webApp);
  		final BundleContext webAppBundleContext = BundleUtils
  				.getBundleContext(webApp.getBundle());
  		if (webAppBundleContext != null) {
  			try {
  				Filter filter = webAppBundleContext.createFilter(String.format(
  						"(&(objectClass=%s)(bundle.id=%d))",
  						WebAppDependencyHolder.class.getName(), webApp
  								.getBundle().getBundleId()));
  				ServiceTracker<WebAppDependencyHolder, WebAppDependencyHolder> dependencyTracker = new ServiceTracker<WebAppDependencyHolder, WebAppDependencyHolder>(
  						webAppBundleContext, filter,
  						new WebAppDependencyListener(webApp, eventDispatcher,
  								bundleContext));
  				webApps.put(webApp, dependencyTracker);
  				dependencyTracker.open();
  			} catch (InvalidSyntaxException exc) {
  				throw new IllegalArgumentException(exc);
  			}
  		} else {
  			LOG.warn("Bundle context could not be discovered for bundle ["
  					+ webApp.getBundle() + "]"
  					+ "Skipping publishing of web application [" + webApp + "]");
  		}
  	}
docs: Publish a web application.
  
  @param webApp web application to be published.
  @throws NullArgumentException if web app is null