public void rename(Name oldName,Name newName) throws NamingException {
  if (_nc == null)   throw new ConfigurationException("Context does not have a corresponding NamingContext");
  if (oldName.size() == 0 || newName.size() == 0)   throw new InvalidNameException("One or both names empty");
  java.lang.Object obj=lookup(oldName);
  bind(newName,obj);
  unbind(oldName);
}

public void rename ( Name oldName , Name newName ) throws NamingException { if ( _nc == null ) throw new ConfigurationException ( "Context does not have a corresponding NamingContext" ) ; if ( oldName . size ( ) == 0 || newName . size ( ) == 0 ) throw new InvalidNameException ( "One or both names empty" ) ; 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 .
