Package org.apache.openejb.util

Examples of org.apache.openejb.util.ExecutorBuilder


            final Executor threadPool;
            if (threadPoolSize <= 0) {
                logger.warning("Thread pool for '" + serviceInfo.id + "' is (unbounded), consider setting a size using: " + serviceInfo.id + ".QueueSize=[size]");
                threadPool = Executors.newCachedThreadPool(new DaemonThreadFactory(serviceInfo.id + "-worker-"));
            } else {
                threadPool = new ExecutorBuilder()
                    .size(threadPoolSize)
                    .prefix(serviceInfo.id)
                    .threadFactory(new DaemonThreadFactory(serviceInfo.id + "-worker-"))
                    .build(new Options(serviceInfo.properties, SystemInstance.get().getOptions()));
                logger.info("Thread pool size for '" + serviceInfo.id + "' is (" + threadPoolSize + ")");
View Full Code Here


        this.executor = threadPoolExecutor;
    }

    public static AsynchronousPool create(final AppContext appContext) {

        final ExecutorBuilder builder = new ExecutorBuilder()
                .prefix("AsynchronousPool")
                .size(3)
                .threadFactory(new DaemonThreadFactory("@Asynchronous", appContext.getId()));

        return new AsynchronousPool(builder.build(appContext.getOptions()));
    }
View Full Code Here

        this.executor = threadPoolExecutor;
    }

    public static AsynchronousPool create(AppContext appContext) {

        final ExecutorBuilder builder = new ExecutorBuilder()
                .prefix("AsynchronousPool")
                .size(10)
                .threadFactory(new DaemonThreadFactory("@Asynchronous", appContext.getId()));

        return new AsynchronousPool(builder.build(appContext.getOptions()));
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.util.ExecutorBuilder

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.