{
String storeLocation = options.getConfigurationStoreLocation();
String storeType = options.getConfigurationStoreType();
PluggableFactoryLoader<SystemConfigFactory> configFactoryLoader = new PluggableFactoryLoader<>(SystemConfigFactory.class);
SystemConfigFactory configFactory = configFactoryLoader.get(storeType);
if(configFactory == null)
{
LOGGER.fatal("Unknown config store type '"+storeType+"', only the following types are supported: " + configFactoryLoader.getSupportedTypes());
throw new IllegalArgumentException("Unknown config store type '"+storeType+"', only the following types are supported: " + configFactoryLoader.getSupportedTypes());
}
_eventLogger.message(BrokerMessages.CONFIG(storeLocation));
//Allow skipping the logging configuration for people who are
//embedding the broker and want to configure it themselves.
if(!options.isSkipLoggingConfiguration())
{
configureLogging(new File(options.getLogConfigFileLocation()), options.getLogWatchFrequency());
}
LogRecorder logRecorder = new LogRecorder();
_taskExecutor.start();
SystemConfig systemConfig = configFactory.newInstance(_taskExecutor, _eventLogger, logRecorder, options);
systemConfig.open();
DurableConfigurationStore store = systemConfig.getConfigurationStore();
_applicationRegistry = new ApplicationRegistry(store, systemConfig);
try