use of org.jboss.as.connector.services.workmanager.transport.ForkChannelTransport in project wildfly by wildfly.
the class DistributedWorkManagerService method start.
@Override
public void start(StartContext context) throws StartException {
ROOT_LOGGER.debugf("Starting JCA DistributedWorkManager: ", value.getName());
ChannelFactory factory = this.jGroupsChannelFactory.getValue();
JGroupsTransport transport = new ForkChannelTransport(factory);
try {
transport.setChannel(factory.createChannel(this.value.getName()));
transport.setClusterName(this.value.getName());
this.value.setTransport(transport);
} catch (Exception e) {
ROOT_LOGGER.trace("failed to start JGroups channel", e);
throw ROOT_LOGGER.failedToStartJGroupsChannel(this.value.getName(), this.value.getName());
}
BlockingExecutor longRunning = (BlockingExecutor) executorLong.getOptionalValue();
if (longRunning != null) {
this.value.setLongRunningThreadPool(longRunning);
this.value.setShortRunningThreadPool((BlockingExecutor) executorShort.getValue());
} else {
this.value.setLongRunningThreadPool((BlockingExecutor) executorShort.getValue());
this.value.setShortRunningThreadPool((BlockingExecutor) executorShort.getValue());
}
this.value.setXATerminator(new XATerminatorImpl(xaTerminator.getValue()));
WorkManagerCoordinator.getInstance().registerWorkManager(value);
try {
transport.startup();
} catch (Throwable throwable) {
ROOT_LOGGER.trace("failed to start DWM transport:", throwable);
throw ROOT_LOGGER.failedToStartDWMTransport(this.value.getName());
}
if (this.value.isElytronEnabled()) {
this.value.setSecurityIntegration(new ElytronSecurityIntegration());
} else {
this.value.setSecurityIntegration(new PicketBoxSecurityIntegration());
}
ROOT_LOGGER.debugf("Started JCA DistributedWorkManager: ", value.getName());
}
Aggregations