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