Package org.apache.ldap.common

Examples of org.apache.ldap.common.MultiException


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

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

        while ( list.hasNext() )
        {
            BackingStore store = ( BackingStore ) 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


        if ( closed )
        {
            return;
        }

        MultiException error = null;

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

        // make sure this loop is not fail fast so all backing stores can
        // have an attempt at closing down and synching their cached entries
        while ( list.hasNext() )
        {
            BackingStore store = ( BackingStore ) list.next();

            try
            {
                store.sync();

                store.close();
            }
            catch ( NamingException e )
            {
                e.printStackTrace();

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

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

        s_singleton = null;
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

        {
            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 );
        }

        closed = true;

        if ( null != rootCause )
View Full Code Here

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

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

        while ( list.hasNext() )
        {
            DirectoryPartition partition = ( DirectoryPartition ) list.next();

            try
            {
                partition.sync();
            }
            catch ( NamingException e )
            {
                log.warn( "Failed to flush partition data out.", e );

                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

        if ( !initialized )
        {
            return;
        }

        MultiException error = null;

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

        // make sure this loop is not fail fast so all backing stores can
        // have an attempt at closing down and synching their cached entries
        while ( list.hasNext() )
        {
            ContextPartition partition = ( ContextPartition ) list.next();

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

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

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

        initialized = false;
View Full Code Here

    /**
     * @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

        if ( !initialized )
        {
            return;
        }

        MultiException error = null;

        Iterator suffixes = new HashSet( this.partitions.keySet() ).iterator();

        // make sure this loop is not fail fast so all backing stores can
        // have an attempt at closing down and synching their cached entries
        while ( suffixes.hasNext() )
        {
            String suffix = (String) suffixes.next();
            try
            {
                removeContextPartition( new LdapName( suffix ) );
            }
            catch ( NamingException e )
            {
                e.printStackTrace();

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

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

        initialized = false;
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.