code: public void revokeService(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow) {
          // todo: for multithreaded usage this block needs to be synchronized
          if (!_serviceProviders.containsKey(serviceClass)) {
              return;
          }
  
          // propagate to any children implementing BeanContextServices
          Iterator i = iterator();
          while (i.hasNext()) {
              Object o = i.next();
              if (o instanceof BeanContextServices) {
                  ((BeanContextServices) o).revokeService(serviceClass, serviceProvider, revokeCurrentServicesNow);
              }
          }
  
          BeanContextServiceRevokedEvent bcsre =
                  new BeanContextServiceRevokedEvent((BeanContextServices)getPeer(), serviceClass, revokeCurrentServicesNow);
          fireServiceRevokedEvent(bcsre);
  
          // fire revoked event to requestor listeners, if the service is delegated the owner of the
          // service should fire these events.
          ServiceProvider sp = _serviceProviders.get(serviceClass);
          if (!sp.isDelegated()) {
              sp.revoke(bcsre);
          }
  
          if (revokeCurrentServicesNow || !sp.hasRequestors()) {
              _serviceProviders.remove(serviceClass);
          }
          // end synchronized
      }
docs: BeanContextServiceProviders wishing to remove
  a currently registered service from this context
  may do so via invocation of this method. Upon revocation of
  the service, the <code>BeanContextServices</code> fires a
  <code>BeanContextServiceRevokedEvent</code> to its
  list of currently registered
  <code>BeanContextServiceRevokedListeners</code> and
  <code>BeanContextServicesListeners</code>.
  
  @param serviceClass             the service to revoke from this BeanContextServices
  @param serviceProvider          the BeanContextServiceProvider associated with
  this particular service that is being revoked
  @param revokeCurrentServicesNow a value of <code>true</code>
  indicates an exceptional circumstance where the
  <code>BeanContextServiceProvider</code> or
  <code>BeanContextServices</code> wishes to immediately
  terminate service to all currently outstanding references
  to the specified service.