code: protected synchronized void removeResourceContext(ResourceContext resourceContext, ControlBean bean)
      {
          //
          // Ignore removal requests received within the context of global cleanup.  The
          // stack is already being popped, so these are just requests for resources that
          // already have in-flight removal taking place.
          //
          if (!_releasingAll && resourceContext.hasResources())
              _resourceContexts.remove(resourceContext);
      }
docs: Removes a managed ResourceContext from the ControlContainerContext.  This method
  is used to unregister a resource context that has already acquired resources
  @param resourceContext the ResourceContext service to be removed
  @param bean the acquiring ControlBean.  Unused by the base implementation, but
  available so subclassed containers can have access to the bean.