public void rename ( String dn , String newDn ) throws WIMException { TimedDirContext ctx = iContextManager . getDirContext ( ) ; iContextManager . checkWritePermission ( ctx ) ; try { try { ctx . rename ( dn , newDn ) ; } catch ( NamingException e ) { if ( ! ContextManager . isConnectionException ( e ) ) { throw e ; } ctx = iContextManager . reCreateDirContext ( ctx , e . toString ( ) ) ; ctx . rename ( dn , newDn ) ; } } catch ( NamingException e ) { String msg = Tr . formatMessage ( tc , WIMMessageKey . NAMING_EXCEPTION , WIMMessageHelper . generateMsgParms ( e . toString ( true ) ) ) ; throw new WIMSystemException ( WIMMessageKey . NAMING_EXCEPTION , msg , e ) ; } finally { iContextManager . releaseDirContext ( ctx ) ; } }
Rename an entity .