Package org.apache.avalon.excalibur.thread.impl

Examples of org.apache.avalon.excalibur.thread.impl.DefaultThreadPool.enableLogging()


        try
        {
            final DefaultThreadPool threadPool =
                new DefaultThreadPool( name, minThreads, maxThreads );
            threadPool.setDaemon( isDaemon );
            threadPool.enableLogging( getLogger() );
            threadPools.put( name, threadPool );
        }
        catch( final Exception e )
        {
            final String message = "Error creating ThreadPool named " + name;
View Full Code Here


    public void testWithThreadContext()
        throws Exception
    {
        final DefaultThreadPool pool = new DefaultThreadPool( "default", 10 );
        pool.setDaemon( false );
        pool.enableLogging( new ConsoleLogger( ConsoleLogger.LEVEL_INFO ) );
        pool.execute( new DummyRunnable() );
    }

    public void testWithoutThreadContext()
        throws Exception
View Full Code Here

    public void testWithoutThreadContext()
        throws Exception
    {
        final DefaultThreadPool pool = new DefaultThreadPool( "default", 10 );
        pool.setDaemon( false );
        pool.enableLogging( new ConsoleLogger( ConsoleLogger.LEVEL_INFO ) );
        pool.execute( new DummyRunnable() );
    }

    private static class DummyRunnable
        implements Runnable
View Full Code Here

    public void testWithoutThreadContext()
        throws Exception
    {
        final DefaultThreadPool pool = new DefaultThreadPool( "default", 10 );
        pool.setDaemon( false );
        pool.enableLogging( new ConsoleLogger( ConsoleLogger.LEVEL_INFO ) );
        pool.execute( new DummyRunnable() );
    }

    private static class DummyRunnable
        implements Runnable
View Full Code Here

    public void testWithThreadContext()
        throws Exception
    {
        final DefaultThreadPool pool = new DefaultThreadPool( "default", 10 );
        pool.setDaemon( false );
        pool.enableLogging( new ConsoleLogger( ConsoleLogger.LEVEL_INFO ) );
        pool.execute( new DummyRunnable() );
    }

    public void testWithoutThreadContext()
        throws Exception
View Full Code Here

        try
        {
            final DefaultThreadPool threadPool =
                new DefaultThreadPool( name, minThreads, maxThreads );
            threadPool.setDaemon( isDaemon );
            threadPool.enableLogging( getLogger() );
            threadPools.put( name, threadPool );
        }
        catch( final Exception e )
        {
            final String message = "Error creating ThreadPool named " + name;
View Full Code Here

    }

    public ThreadPool getDefaultThreadPool() {
        try {
            DefaultThreadPool defaultThreadPool = new DefaultThreadPool(1);
            defaultThreadPool.enableLogging(new MockLogger());
            return defaultThreadPool;
        } catch (Exception e) {
            e.printStackTrace()
            return null;
        }
View Full Code Here

    }

    public ThreadPool getDefaultThreadPool() {
        try {
            DefaultThreadPool defaultThreadPool = new DefaultThreadPool(1);
            defaultThreadPool.enableLogging(new MockLogger());
            return defaultThreadPool;
        } catch (Exception e) {
            e.printStackTrace()
            return null;
        }
View Full Code Here

        try
        {
            final DefaultThreadPool threadPool =
                new DefaultThreadPool( name, minThreads, maxThreads );
            threadPool.setDaemon( isDaemon );
            threadPool.enableLogging( getLogger() );
            threadPools.put( name, threadPool );
        }
        catch( final Exception e )
        {
            final String message = "Error creating ThreadPool named " + name;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.