@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("Starting JCA WorkManager: ", value.getName()); 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())); if (value.getName().equals(DEFAULT_NAME)) { WorkManagerCoordinator.getInstance().setDefaultWorkManager(value); } else { WorkManagerCoordinator.getInstance().registerWorkManager(value); } //this is a value.restart() equivalent if (value.isShutdown()) value.cancelShutdown(); if (this.value.isElytronEnabled()) { this.value.setSecurityIntegration(new ElytronSecurityIntegration()); } else { this.value.setSecurityIntegration(new PicketBoxSecurityIntegration()); } ROOT_LOGGER.debugf("Started JCA WorkManager: ", value.getName()); }
@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("Starting JCA 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())); if (this.value.isElytronEnabled()) { this.value.setSecurityIntegration(new ElytronSecurityIntegration()); } else { this.value.setSecurityIntegration(new PicketBoxSecurityIntegration()); } 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 JCA DistributedWorkManager: ", value.getName()); }
@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("Starting JCA WorkManager: ", value.getName()); 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())); if (value.getName().equals(DEFAULT_NAME)) { WorkManagerCoordinator.getInstance().setDefaultWorkManager(value); } else { WorkManagerCoordinator.getInstance().registerWorkManager(value); } //this is a value.restart() equivalent if (value.isShutdown()) value.cancelShutdown(); if (this.value.isElytronEnabled()) { this.value.setSecurityIntegration(new ElytronSecurityIntegration()); } else { this.value.setSecurityIntegration(new PicketBoxSecurityIntegration()); } ROOT_LOGGER.debugf("Started JCA WorkManager: ", value.getName()); }
@Override public void start(StartContext context) throws StartException { ROOT_LOGGER.debugf("Starting JCA 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())); if (this.value.isElytronEnabled()) { this.value.setSecurityIntegration(new ElytronSecurityIntegration()); } else { this.value.setSecurityIntegration(new PicketBoxSecurityIntegration()); } 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 JCA DistributedWorkManager: ", value.getName()); }