Free cookie consent management tool by TermsFeed Policy Generator

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

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

#1260

  • changed dependency discovery machanism: now all locally loaded plugins will be dependencies for a job.
  • fixed logging of slaveconsole by limiting the maximum log-messages
  • minor bug fixes.
File size: 1.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Web;
6using System.Threading;
7using System.IO;
8using HeuristicLab.Hive.Contracts.Interfaces;
9using HeuristicLab.PluginInfrastructure;
10using HeuristicLab.PluginInfrastructure.Manager;
11using HeuristicLab.Hive.Tracing;
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 ISlaveCommunicator slaveCommunicator;
18
19    public void Init(HttpApplication context) {
20      lock (locker) {
21        Logger.Info("Starting HiveServerModule");
22        if (lifecycleManager == null) {
23          lifecycleManager = ServiceLocator.GetLifecycleManager();
24        }
25        if (slaveCommunicator == null) {
26          slaveCommunicator = ServiceLocator.GetSlaveCommunicator();
27        }
28      }
29    }
30
31    public void Dispose() {
32      lock (locker) {
33        Logger.Info("Disposing HiveServerModule");
34        if(lifecycleManager != null) lifecycleManager.Stop();
35      }
36    }
37  }
38}
Note: See TracBrowser for help on using the repository browser.