use of org.wildfly.extension.requestcontroller.RequestController in project wildfly by wildfly.
the class BatchEnvironmentService method start.
@Override
public synchronized void start(final StartContext context) throws StartException {
BatchLogger.LOGGER.debugf("Creating batch environment; %s", classLoader);
final BatchConfiguration batchConfiguration = batchConfigurationInjector.getValue();
// Find the job executor to use
JobExecutor jobExecutor = jobExecutorInjector.getOptionalValue();
if (jobExecutor == null) {
jobExecutor = batchConfiguration.getDefaultJobExecutor();
}
// Find the job repository to use
JobRepository jobRepository = jobRepositoryInjector.getOptionalValue();
if (jobRepository == null) {
jobRepository = batchConfiguration.getDefaultJobRepository();
}
this.batchEnvironment = new WildFlyBatchEnvironment(beanManagerInjector.getOptionalValue(), jobExecutor, transactionManagerInjector.getValue(), jobRepository, jobXmlResolver);
final RequestController requestController = requestControllerInjector.getOptionalValue();
if (requestController != null) {
// Create the entry point
controlPoint = requestController.getControlPoint(deploymentName, "batch-executor-service");
} else {
controlPoint = null;
}
}
Aggregations