Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive/HiveWeb/App_Code/HiveServerModule.cs @ 4772

Last change on this file since 4772 was 4772, checked in by cneumuel, 13 years ago

#1260

  • added LogServiceReader to display log for slave without writing to local files
  • aborted jobs with childjobs now got back to state WaitForChildJob (instead of Offline)
  • lifecyclemanager now knows about available plugins (does not yet work perfectly)
File size: 1.2 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Web;
6using System.Threading;
7using HeuristicLab.Tracing;
8using System.IO;
9using HeuristicLab.Hive.Contracts.Interfaces;
10using HeuristicLab.PluginInfrastructure;
11using HeuristicLab.PluginInfrastructure.Manager;
12
13namespace HeuristicLab.Hive.Server.Core.IISModules {
14  public class HiveServerModule : IHttpModule {
15    private static object locker = new object();
16    private static ILifecycleManager lifecycleManager;
17    private static PluginManager pm;
18
19    public void Init(HttpApplication context) {
20      lock (locker) {
21        if (lifecycleManager == null) {
22          pm = new PluginManager(@"C:\ch\SVN\branches\HeuristicLab.Hive\sources\HeuristicLab.Hive\HiveWeb\App_Data\Plugins\");
23          pm.DiscoverAndCheckPlugins();
24          pm.InitializeLifetimeService();
25
26          lifecycleManager = ServiceLocator.GetLifecycleManager();
27          lifecycleManager.Plugins = pm.Plugins;
28          lifecycleManager.Start();
29        }
30      }
31    }
32
33    public void Dispose() {
34      lock (locker) {
35        if(lifecycleManager != null) lifecycleManager.Stop();
36      }
37    }
38  }
39}
Note: See TracBrowser for help on using the repository browser.