Package bitronix.tm.twopc.executor

Examples of bitronix.tm.twopc.executor.Executor


    /**
     * Create the 2PC executor.
     * @return the 2PC executor.
     */
    public static Executor getExecutor() {
        Executor executor = executorRef.get();
        if (executor == null) {
            if (getConfiguration().isAsynchronous2Pc()) {
                if (log.isDebugEnabled()) { log.debug("using AsyncExecutor"); }
                executor = new AsyncExecutor();
            } else {
                if (log.isDebugEnabled()) { log.debug("using SyncExecutor"); }
                executor = new SyncExecutor();
            }
            if (!executorRef.compareAndSet(null, executor)) {
                executor.shutdown();
                executor = executorRef.get();
            }
        }
        return executor;
    }
View Full Code Here

TOP

Related Classes of bitronix.tm.twopc.executor.Executor

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.