Free cookie consent management tool by TermsFeed Policy Generator

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

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

#1260

  • applied new cloning mechanism
  • changed role names
File size: 849 bytes
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;
11
12namespace HeuristicLab.Hive.Server.Core.IISModules {
13  public class HiveServerModule : IHttpModule {
14    private static object locker = new object();
15    private static ILifecycleManager lifecycleManager;
16   
17    public void Init(HttpApplication context) {
18      lock (locker) {
19        if(lifecycleManager == null) lifecycleManager = ServiceLocator.GetLifecycleManager();
20        lifecycleManager.Start();
21      }
22    }
23
24    public void Dispose() {
25      lock (locker) {
26        if(lifecycleManager != null) lifecycleManager.Stop();
27      }
28    }
29  }
30}
Note: See TracBrowser for help on using the repository browser.