/** * This starts up the entire core system. May be called more than once: subsequent calls return * without effect. * * @param dspaceHome path to DSpace home directory */ public void start(String dspaceHome) { if (running) { // log.warn("Kernel ("+this+") is already started"); return; } synchronized (lock) { lastLoadDate = new Date(); long startTime = System.currentTimeMillis(); // create the configuration service and get the configuration DSpaceConfigurationService dsConfigService = new DSpaceConfigurationService(dspaceHome); configurationService = dsConfigService; // startup the service manager serviceManagerSystem = new DSpaceServiceManager(dsConfigService); serviceManagerSystem.startup(); // initialize the static // DSpace.initialize(serviceManagerSystem); loadTime = System.currentTimeMillis() - startTime; kernel = this; running = true; List<KernelStartupCallbackService> callbackServices = new DSpace().getServiceManager().getServicesByType(KernelStartupCallbackService.class); for (KernelStartupCallbackService callbackService : callbackServices) { callbackService.executeCallback(); } // add in the shutdown hook registerShutdownHook(); } log.info( "DSpace kernel startup completed in " + loadTime + " ms and registered as MBean: " + mBeanName); }