Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/08 18:03:51 (16 years ago)
Author:
svonolfe
Message:

Added caching, thread safety to DataAccess layer (#372)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server/HiveServerApplication.cs

    r805 r925  
    8888      if (serverConsoleInstances.Length > 0) {
    8989        ServiceHost serviceHost =
    90                 new ServiceHost(serverConsoleInstances[0].GetType(),
     90            new ServiceHost(serverConsoleInstances[0].GetType(),
    9191                  uriTcp);
    9292
     
    139139        StartServerConsoleFacade(uriTcp);
    140140
    141       Form mainForm = new MainForm(clientCommunicator.BaseAddresses[0],
    142         serverConsoleFacade.BaseAddresses[0]);
     141      ILifecycleManager[] lifecycleManagers =
     142         discService.GetInstances<ILifecycleManager>();
    143143
    144       Application.Run(mainForm);
     144      if (lifecycleManagers.Length > 0) {
     145        ILifecycleManager lifecycleManager =
     146          lifecycleManagers[0];
     147
     148        lifecycleManager.Init();
     149
     150        Form mainForm = new MainForm(clientCommunicator.BaseAddresses[0],
     151            serverConsoleFacade.BaseAddresses[0]);
     152
     153         Application.Run(mainForm);
     154
     155         lifecycleManager.Shtudown();
     156      }
    145157
    146158      clientCommunicator.Close();
    147159      serverConsoleFacade.Close();
     160
     161     
    148162    }
    149163  }
Note: See TracChangeset for help on using the changeset viewer.