@Inject
private Event<ExecutionServiceInitialized> executionServiceInitialized;
public void createExecutionService(@Observes SpaceliftBootstrap event) {
ExecutionServiceFactory factory = serviceLoader.get().onlyOne(ExecutionServiceFactory.class,
DefaultExecutionServiceFactory.class);
log.log(Level.FINE, "Registering ExecutionServiceFactory for Tasks creation");
Tasks.setDefaultExecutionServiceFactory(factory);
log.log(Level.FINE, "Retrieving ExecutionService instance from factory {0}", factory.getClass().getName());
ExecutionService service = factory.getExecutionServiceInstance();
executionServiceInstance.set(service);
executionServiceInitialized.fire(new ExecutionServiceInitialized());
}