Package org.apache.ldap.common

Examples of org.apache.ldap.common.MultiException


    /**
     * @see ContextPartition#sync()
     */
    public void sync() throws NamingException
    {
        MultiException error = null;

        Iterator list = this.partitions.values().iterator();

        while ( list.hasNext() )
        {
            ContextPartition store = ( ContextPartition ) list.next();

            try
            {
                store.sync();
            }
            catch ( NamingException e )
            {
                e.printStackTrace();

                if ( error == null )
                {
                    error = new MultiException( "Grouping many exceptions on root nexus sync()" );
                }

                // @todo really need to send this info to a monitor
                error.addThrowable( e );
            }
        }

        if ( error != null )
        {
View Full Code Here


        {
            array.add( existanceIdx );
        }
       
        Iterator list = array.iterator();
        MultiException rootCause = null;
       
        while ( list.hasNext() )
        {
            Index index = ( Index ) list.next();

            try
            {
               index.close();
            }
            catch ( Throwable t )
            {
                if ( null == rootCause )
                {
                    rootCause = new MultiException();
                }
               
                rootCause.addThrowable( t );
            }
        }

        try
        {
            master.close();
        }
        catch ( Throwable t )
        {
            if ( null == rootCause )
            {
                rootCause = new MultiException();
            }
               
            rootCause.addThrowable( t );
        }

        try
        {
            recMan.close();
        }
        catch ( Throwable t )
        {
            if ( null == rootCause )
            {
                rootCause = new MultiException();
            }
               
            rootCause.addThrowable( t );
        }

        initialized = false;

        if ( null != rootCause )
View Full Code Here

        array.add( subAliasIdx );
        array.add( hierarchyIdx );
        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 )
            {
                t.printStackTrace();
                if ( null == rootCause )
                {
                    rootCause = new MultiException();
                }
               
                rootCause.addThrowable( t );
            }
        }
       
        try
        {
            master.sync();
            recMan.commit();
        }
        catch ( Throwable t )
        {
            t.printStackTrace();
            if ( null == rootCause )
            {
                rootCause = new MultiException();
            }
               
            rootCause.addThrowable( t );
        }

        if ( null != rootCause )
        {
            NamingException ne = new NamingException( "Failed to sync all" );
View Full Code Here

TOP

Related Classes of org.apache.ldap.common.MultiException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.