Example #1
0
        internal void DoStart()
        {
            ConsoleWriteLine();
            ConsoleWriteLine("Starting Repository...");
            ConsoleWriteLine();

            //-- Lucene subsystem behaves strangely if the enums are not initialized.
            var x = Lucene.Net.Documents.Field.Index.NO;
            var y = Lucene.Net.Documents.Field.Store.NO;
            var z = Lucene.Net.Documents.Field.TermVector.NO;

            CounterManager.Start();

            RegisterAppdomainEventHandlers();

            if (_settings.IndexPath != null)
            {
                StorageContext.Search.SetIndexDirectoryPath(_settings.IndexPath);
            }
            RemoveIndexWriterLockFile();
            _startupInfo.IndexDirectory = System.IO.Path.GetDirectoryName(StorageContext.Search.IndexLockFilePath);

            LoadAssemblies();
            using (new SenseNet.ContentRepository.Storage.Security.SystemAccount())
                StartManagers();

            ConsoleWriteLine();
            ConsoleWriteLine("Repository has started.");
            ConsoleWriteLine();

            _startupInfo.Started = DateTime.UtcNow;
        }
Example #2
0
        internal void DoStart()
        {
            ConsoleWriteLine();
            ConsoleWriteLine("Starting Repository...");
            ConsoleWriteLine();

            var x = Lucene.Net.Documents.Field.Index.NO;
            var y = Lucene.Net.Documents.Field.Store.NO;
            var z = Lucene.Net.Documents.Field.TermVector.NO;

            CounterManager.Start();

            RegisterAppdomainEventHandlers();

            if (_settings.IndexPath != null)
            {
                StorageContext.Search.SetIndexDirectoryPath(_settings.IndexPath);
            }
            RemoveIndexWriterLockFile();

            LoadAssemblies();
            StartManagers();

            ConsoleWriteLine();
            ConsoleWriteLine("Repository has started.");
            ConsoleWriteLine();

            _startupInfo.Started = DateTime.Now;
        }
        internal void DoStart()
        {
            ConsoleWriteLine();
            ConsoleWriteLine("Starting Repository...");
            ConsoleWriteLine();

            if (_settings.TraceCategories != null)
            {
                LoggingSettings.SnTraceConfigurator.UpdateCategories(_settings.TraceCategories);
            }
            else
            {
                LoggingSettings.SnTraceConfigurator.UpdateStartupCategories();
            }

            TypeHandler.Initialize(_settings.Providers);

            SearchManager.SetSearchEngineSupport(new SearchEngineSupport());

            InitializeLogger();

            CounterManager.Start();

            RegisterAppdomainEventHandlers();

            if (_settings.IndexPath != null)
            {
                SearchManager.SetIndexDirectoryPath(_settings.IndexPath);
            }

            LoadAssemblies();

            SecurityHandler.StartSecurity(_settings.IsWebContext);

            using (new SystemAccount())
                StartManagers();

            if (_settings.TraceCategories != null)
            {
                LoggingSettings.SnTraceConfigurator.UpdateCategories(_settings.TraceCategories);
            }
            else
            {
                LoggingSettings.SnTraceConfigurator.UpdateCategories();
            }

            InitializeOAuthProviders();

            ConsoleWriteLine();
            ConsoleWriteLine("Repository has started.");
            ConsoleWriteLine();

            _startupInfo.Started = DateTime.UtcNow;
        }