use of org.jboss.as.connector.services.workmanager.transport.CommandDispatcherTransport in project wildfly by wildfly.
the class DistributedWorkManagerService method start.
@Override
public void start(StartContext context) throws StartException {
ROOT_LOGGER.debugf("Starting Jakarta Connectors DistributedWorkManager: ", value.getName());
CommandDispatcherTransport transport = new CommandDispatcherTransport(this.dispatcherFactory.getValue(), this.value.getName());
this.value.setTransport(transport);
BlockingExecutor longRunning = (BlockingExecutor) executorLong.getOptionalValue();
if (longRunning != null) {
this.value.setLongRunningThreadPool(longRunning);
this.value.setShortRunningThreadPool(new StatisticsExecutorImpl((BlockingExecutor) executorShort.getValue()));
} else {
this.value.setLongRunningThreadPool(new StatisticsExecutorImpl((BlockingExecutor) executorShort.getValue()));
this.value.setShortRunningThreadPool(new StatisticsExecutorImpl((BlockingExecutor) executorShort.getValue()));
}
this.value.setXATerminator(new XATerminatorImpl(xaTerminator.getValue()));
this.value.setSecurityIntegration(new ElytronSecurityIntegration());
try {
transport.startup();
} catch (Throwable throwable) {
ROOT_LOGGER.trace("failed to start DWM transport:", throwable);
throw ROOT_LOGGER.failedToStartDWMTransport(this.value.getName());
}
transport.register(new Address(value.getId(), value.getName(), transport.getId()));
WorkManagerCoordinator.getInstance().registerWorkManager(value);
ROOT_LOGGER.debugf("Started Jakarta Connectors DistributedWorkManager: ", value.getName());
}
Aggregations