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); }
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); }