// Add an extension-based detector by default ...
detectors.addDetector(new MimeTypeDetectorConfig("ExtensionDetector", "Extension-based MIME type detector",
ExtensionBasedMimeTypeDetector.class));
// Create the RepositoryContext that the configuration repository source should use ...
ObservationBus configurationChangeBus = new ObservationBus();
RepositoryContext configContext = new SimpleRepositoryContext(context, configurationChangeBus, null);
final RepositorySource configSource = this.configuration.getRepositorySource();
configSource.initialize(configContext);
// Create the RepositoryService, pointing it to the configuration repository ...
Path pathToConfigurationRoot = this.configuration.getPath();
String configWorkspaceName = this.configuration.getWorkspace();
repositoryService = new RepositoryService(configSource, configWorkspaceName, pathToConfigurationRoot, context, problems);
// Now register the repository service to be notified of changes to the configuration ...
configurationChangeBus.register(repositoryService);
// Create the sequencing service ...
executorService = new ScheduledThreadPoolExecutor(10); // Use a magic number for now
sequencingService = new SequencingService();
sequencingService.setExecutionContext(context);