code: public synchronized boolean hasService(Class serviceClass) {
  
          // todo: for multithreaded usage this block needs to be synchronized
          ServiceProvider sp = _serviceProviders.get(serviceClass);
          if (sp != null && !sp.isRevoked()) {
              return true;
          }
  
          // if service not found locally check in nested context
          BeanContext bc = getBeanContext();
          if (bc instanceof BeanContextServices) {
              return ((BeanContextServices) bc).hasService(serviceClass);
          }
          return false;
          // end synchronized
      }
docs: Reports whether or not a given service is
  currently available from this context.
  
  @param serviceClass the service in question
  @return true if the service is available