code: private Context getURLContextOrFail(String name) throws NamingException {
          Context urlContext = null;
  
          if (name.contains(":")) {
              urlContext = getURLContext(name);
              if (urlContext == null) {
                  fail(name);
              }
          } else {
              fail(name);
          }
  
          return urlContext;
      }
docs: Get the URL context for the given name. The URL context is only possible
  if the name contains a ":", indicating that the name is actually a URL with
  a scheme. If the URL context isn't available, an exception is thrown indicating
  that the jndi feature needs to be enabled to do the specified operation by
  the user.
  
  @param name The name to get the URL context for or fail if one isn't available
  @return The URL context if available
  @throws NamingException