+ /* create trust updater. */
+ WebOfTrustUpdater trustUpdater = new WebOfTrustUpdater(webOfTrustConnector);
+ trustUpdater.init();
+
+ /* create core. */
+ core = new Core(oldConfiguration, soneDatabase, freenetInterface, identityManager, trustUpdater);
+
+ /* create the web interface. */
+ webInterface = new WebInterface(this);
+ core.addCoreListener(webInterface);
+
+ /* create FCP interface. */
+ fcpInterface = new FcpInterface(core);
+ core.setFcpInterface(fcpInterface);
+
+ /* create the identity manager. */
+ identityManager.addIdentityListener(core);
+
+ /* start core! */
+ core.start();
+ if ((newConfiguration != null) && (oldConfiguration != newConfiguration)) {
+ logger.log(Level.INFO, "Setting configuration to file-based configuration.");
+ core.setConfiguration(newConfiguration);
+ }
+ webInterface.start();
+ webInterface.setFirstStart(firstStart);
+ webInterface.setNewConfig(newConfig);
+ identityManager.start();
+ startupFailed = false;
+ } finally {
+ if (startupFailed) {
+ /*
+ * we let the exception bubble up but shut the logging down so
+ * that the logfile is not swamped by the installed logging
+ * handlers of the failed instances.
+ */
+ Logging.shutdown();
+ }
+ }