Ejemplo n.º 1
0
  public void rename(Name oldName, Name newName) throws NamingException {
    Object value = lookup(oldName);
    unbind(oldName);

    if (value instanceof ContextImpl) ((ContextImpl) value).setName(newName.toString());

    bind(newName, value);
  }
Ejemplo n.º 2
0
  public void rename(String oldName, String newName) throws NamingException {
    Object value = lookup(oldName);
    unbindImpl(oldName, true);

    if (value instanceof ContextImpl) ((ContextImpl) value).setName(newName);

    bind(newName, value);
  }