code: public static ComponentMetaData getComponentMetaData(JavaColonNamespace namespace, String name) throws NamingException {
          ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData();
          if (cmd == null) {
              String fullName = name.isEmpty() ? namespace.toString() : namespace + "/" + name;
              String msg = Tr.formatMessage(tc, "JNDI_NON_JEE_THREAD_CWWKN0100E", fullName);
              NamingException nex = new NamingException(msg);
              throw nex;
          }
          return cmd;
      }
docs: Helper method to get the component metadata from the thread context.
  
  @return the component metadata data for the thread.
  @throws NamingException Throws NamingException if running on a non-Java EE thread.