}
recMan.commit(); }
    public void sync() throws NamingException    {        ArrayList array = new ArrayList();        array.addAll( indices.values() );        array.add( ndnIdx );        array.add( updnIdx );        array.add( aliasIdx );        array.add( oneAliasIdx );        array.add( subAliasIdx );        array.add( heirarchyIdx );        array.add( existanceIdx );                Iterator list = array.iterator();        MultiException rootCause = null;        // Sync all user defined indices        while ( list.hasNext() )         {            Index idx = ( Index ) list.next();            try             {                idx.sync();            }             catch ( Throwable t )             {                if ( null == rootCause )                 {                    rootCause = new MultiException();                }                                rootCause.addThrowable( t );            }        }                try         {            master.sync();        }         catch ( Throwable t )         {            if ( null == rootCause )             {                rootCause = new MultiException();            }                            rootCause.addThrowable( t );        }        if ( null != rootCause )        {            NamingException ne = new NamingException( "Failed to sync all" );            ne.setRootCause( rootCause );            throw ne;        }            }