code: public void associateHttpContext(final WebContainerContext httpContext, final Bundle bundle,
  									 final boolean allowReAsssociation) {
  		List<String> virtualHosts = resolveVirtualHosts(bundle);
  		for (String virtualHost : virtualHosts) {
  			ConcurrentMap<WebContainerContext, Bundle> virtualHostHttpContexts = httpContexts.get(virtualHost);
  			if (virtualHostHttpContexts == null) {
  				virtualHostHttpContexts = new ConcurrentHashMap<>();
  				httpContexts.put(virtualHost, virtualHostHttpContexts);
  			}
  			final Bundle currentBundle = virtualHostHttpContexts.putIfAbsent(httpContext, bundle);
  			if ((!allowReAsssociation) && currentBundle != null && currentBundle != bundle) {
  					throw new IllegalStateException("Http context " + httpContext + " is already associated to bundle "
  									+ currentBundle);
  			}
  		}
  	}
docs: Associates a http context with a bundle if the http service is not
  already associated to another bundle. This is done in order to prevent
  sharing http context between bundles. The implementation is not 100%
  correct as it can be that at a certain moment in time when this method is
  called,another thread is processing a release of the http service,
  process that will deassociate the bundle that released the http service,
  and that bundle could actually be related to the http context that this
  method is trying to associate. But this is less likely to happen as it
  should have as precondition that this is happening concurrent and that
  the two bundles are sharing the http context. But this solution has the
  benefits of not needing synchronization.
  
  @param httpContext         http context to be assicated to the bundle
  @param bundle              bundle to be assiciated with the htp service
  @param allowReAsssociation if it should allow a context to be reassiciated to a bundle
  @throws IllegalStateException - If htp context is already associated to another bundle.