@Override
  public void unbind(Name name) throws NamingException {
    checkIsDestroyed();
    Name parsedName = getParsedName(name);
    if (parsedName.size() == 0 || parsedName.get(0).length() == 0) {
      throw new InvalidNameException(
          "Name can not be empty!");
    }
    String nameToRemove = parsedName.get(0);
    // scenerio unbind a
    // remove a and its associated object
    if (parsedName.size() == 1) {
      ctxMaps.remove(nameToRemove);
    } else {
      // scenerio unbind a/b or a/b/c
      // remove b and its associated object
      Object boundObject = ctxMaps.get(nameToRemove);
      if (boundObject instanceof Context) {
        // remove b and its associated object
        ((Context) boundObject).unbind(parsedName.getSuffix(1));
      } else {
        // if the name is not found then throw exception
        if (!ctxMaps.containsKey(nameToRemove)) {
          throw new NameNotFoundException(
              String.format("Can not find %s", name));
        }
        throw new NotContextException(String.format("Expected Context but found %s",
            boundObject));
      }
    }
  }
Removes name and its associated object from the context.

@param name name to remove
@throws NoPermissionException if this context has been destroyed.
@throws InvalidNameException if name is empty or is CompositeName that spans more than one
        naming system
@throws NameNotFoundException if intermediate context can not be found
@throws NotContextException if name has more than one atomic name and intermediate context is
        not found.
@throws NamingException if any other naming exception occurs
geode-core/src/main/java/org/apache/geode/internal/jndi/ContextImpl.java