Search in sources :

Example 1 with CommandDispatcherTransport

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());
}
Also used : Address(org.jboss.jca.core.spi.workmanager.Address) ElytronSecurityIntegration(org.jboss.as.connector.security.ElytronSecurityIntegration) CommandDispatcherTransport(org.jboss.as.connector.services.workmanager.transport.CommandDispatcherTransport) XATerminatorImpl(org.jboss.jca.core.tx.jbossts.XATerminatorImpl) BlockingExecutor(org.jboss.threads.BlockingExecutor)

Aggregations

ElytronSecurityIntegration (org.jboss.as.connector.security.ElytronSecurityIntegration)1 CommandDispatcherTransport (org.jboss.as.connector.services.workmanager.transport.CommandDispatcherTransport)1 Address (org.jboss.jca.core.spi.workmanager.Address)1 XATerminatorImpl (org.jboss.jca.core.tx.jbossts.XATerminatorImpl)1 BlockingExecutor (org.jboss.threads.BlockingExecutor)1