public static void init() {
synchronized (AppContext.communicatorsLock) {
ConnectionFactory.init();
if (AppContext.otiScheduler == null) {
// set up new scheduler with high priority threads
AppContext.otiScheduler = new ScheduledThreadPoolExecutor(1, new NamedPriorityThreadFactory("OTI",
Thread.MAX_PRIORITY));
}
if (AppContext.eci_cri_Scheduler == null) {
// set up new scheduler with high priority threads
AppContext.eci_cri_Scheduler = new ScheduledThreadPoolExecutor(1, new NamedPriorityThreadFactory("ECI_CRI",
Thread.MAX_PRIORITY));
}
if (AppContext.scWorkerThreadPool == null) {
AppContext.scWorkerThreadPool = Executors.newCachedThreadPool(new NamedPriorityThreadFactory("SC_WORKER"));
}
if (AppContext.orderedSCWorkerThreadPool == null) {
AppContext.orderedSCWorkerThreadPool = new OrderedMemoryAwareThreadPoolExecutor(
Constants.DEFAULT_MAX_ORDERED_IO_THREADS, 0, 0, 10, TimeUnit.SECONDS, new NamedPriorityThreadFactory(
"ORDERED_SC_WORKER"));
}
}
}