iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/naming/jndi/CNCtx.java
public void rename(Name oldName, Name newName)
            throws NamingException {
        if (_nc == null)
            throw IIOPLogger.ROOT_LOGGER.notANamingContext(oldName.toString());
        if (oldName.size() == 0 || newName.size() == 0)
            throw IIOPLogger.ROOT_LOGGER.invalidEmptyName();
        java.lang.Object obj = lookup(oldName);
        bind(newName, obj);
        unbind(oldName);
    }
public void rename(Name oldName, Name newName)
            throws NamingException {
        if (_nc == null)
            throw IIOPLogger.ROOT_LOGGER.notANamingContext(oldName.toString());
        if (oldName.size() == 0 || newName.size() == 0)
            throw IIOPLogger.ROOT_LOGGER.invalidEmptyName();
        java.lang.Object obj = lookup(oldName);
        bind(newName, obj);
        unbind(oldName);
    }
public void rename ( Name oldName , Name newName ) throws NamingException { if ( _nc == null ) throw IIOPLogger . ROOT_LOGGER . notANamingContext ( oldName . toString ( ) ) ; if ( oldName . size ( ) == 0 || newName . size ( ) == 0 ) throw IIOPLogger . ROOT_LOGGER . invalidEmptyName ( ) ; java . lang . Object obj = lookup ( oldName ) ; bind ( newName , obj ) ; unbind ( oldName ) ; }
Renames an object. Since COS Naming does not support a rename
api, this method unbinds the object with the "oldName" and
creates a new binding.

@param oldName JNDI Name, existing name for the binding.
@param newName JNDI Name, name used to replace.
@throws NamingException See bind
Renames an object . Since COS Naming does not support a rename api this method unbinds the object with the oldName and creates a new binding .