docs: @Override
      public Collection<? extends NameClassPair> listInstances(JavaColonNamespace namespace, String nameInContext) throws NamingException {
  
          // only handles java:global, java:app, and java:module
          if (namespace != JavaColonNamespace.GLOBAL &&
              namespace != JavaColonNamespace.APP &&
              namespace != JavaColonNamespace.MODULE) {
              return Collections.emptyList();
          }
  
          ComponentMetaData cmd = getComponentMetaData(namespace, nameInContext);
  
          JavaColonNamespaceBindings<EJBBinding> bindingsMap;
          boolean lockingRequired = true;
  
          if (namespace == JavaColonNamespace.GLOBAL) {
              bindingsMap = javaColonGlobalBindings;
          } else if (namespace == JavaColonNamespace.MODULE) {
              bindingsMap = getModuleBindingMap(cmd.getModuleMetaData());
              lockingRequired = false;
          } else {
              bindingsMap = getAppBindingMap(cmd.getModuleMetaData().getApplicationMetaData());
          }
  
          Collection<? extends NameClassPair> retVal = null;
  
          Lock readLock = null;
          if (lockingRequired) {
              readLock = javaColonLock.readLock();
              readLock.lock();
          }
  
          try {
              retVal = bindingsMap.listInstances(nameInContext);
          } finally {
              if (readLock != null) {
                  readLock.unlock();
              }
          }
  
          return retVal;
      }