Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1936


Ignore:
Timestamp:
05/28/09 17:26:51 (15 years ago)
Author:
kgrading
Message:

switchback to dynamic loading (#653)

Location:
trunk/sources
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/WcfService.cs

    r1812 r1936  
    229229
    230230    private void proxy_ProcessHeartBeatCompleted(object sender, ProcessHeartBeatCompletedEventArgs e) {
    231       if (e.Error == null)
     231      if (e.Error == null && e.Result.Success == true)
    232232        SendHeartBeatCompleted(sender, e);
    233233      else
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs

    r1830 r1936  
    239239        //Todo: make a set & override the equals method
    240240        List<byte[]> files = new List<byte[]>();
    241         //foreach (CachedHivePluginInfo plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.PluginsNeeded))
    242         //  files.AddRange(plugininfo.PluginFiles);
     241        foreach (CachedHivePluginInfo plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.PluginsNeeded))
     242          files.AddRange(plugininfo.PluginFiles);
    243243       
    244         AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, null, files);
     244        AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, null, files);       
    245245        appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
    246246        lock (engines) {                   
     
    251251            Executor engine = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
    252252            engine.JobId = e.Result.Job.Id;
    253             engine.Queue = MessageQueue.GetInstance();
     253            engine.Queue = MessageQueue.GetInstance();           
    254254            engine.Start(e.Result.Job.SerializedJob);
    255255            engines.Add(e.Result.Job.Id, engine);
     
    333333
    334334    void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
    335       Logging.Instance.Error(this.ToString(), "Exception in AppDomain: " + e.ExceptionObject.ToString());
    336      
    337     }
    338 
    339     internal Dictionary<Guid, Job> GetJobs() {
     335      Logging.Instance.Error(this.ToString(), "Exception in AppDomain: " + e.ExceptionObject.ToString());     
     336    }
     337
     338    internal Dictionary<Guid, Job> GetJobs() {           
    340339      return jobs;
    341340    }
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Heartbeat.cs

    r1755 r1936  
    9595    void wcfService_ProcessHeartBeatCompleted(object sender, ProcessHeartBeatCompletedEventArgs e) {
    9696      System.Diagnostics.Debug.WriteLine("Heartbeat received! ");
    97       e.Result.ActionRequest.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc));
     97      e.Result.ActionRequest.ForEach(mc => MessageQueue.GetInstance().AddMessage(mc));     
    9898    }
    9999
  • trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/3.2/Executor.cs

    r1812 r1936  
    5353    public void Start(byte[] serializedJob) {
    5454      CreationTime = DateTime.Now;
     55     
    5556      Job = (IJob)PersistenceManager.RestoreFromGZip(serializedJob);
    5657      //debug
  • trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs

    r1755 r1936  
    225225      setup.ApplicationBase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;     
    226226      AppDomain applicationDomain = AppDomain.CreateDomain(friendlyName, AppDomain.CurrentDomain.Evidence, setup, pset, CreateStrongName(Assembly.GetExecutingAssembly()));
    227                      
    228227      Runner remoteRunner = (Runner)applicationDomain.CreateInstanceAndUnwrap(typeof(Runner).Assembly.GetName().Name, typeof(Runner).FullName);
    229228      NotifyListeners(PluginManagerAction.Initializing, "All plugins");
    230229
    231       //if (assemblyFiles != null && assemblyFiles.Count > 0)
    232       //  remoteRunner.LoadPlugins(assemblyFiles);
     230      if (assemblyFiles != null && assemblyFiles.Count > 0)
     231        remoteRunner.LoadPlugins(assemblyFiles);
    233232     
    234233      //if (depPlugins != null && depPlugins.Count > 0) {       
    235         remoteRunner.LoadPlugins(ActivePlugins);
     234        //remoteRunner.LoadPlugins(ActivePlugins);
    236235      //}
    237       NotifyListeners(PluginManagerAction.Initialized, "All plugins");
     236      NotifyListeners(PluginManagerAction.Initialized, "All plugins");   
    238237      return applicationDomain;
    239238    }
  • trunk/sources/HeuristicLab.PluginInfrastructure/Runner.cs

    r1666 r1936  
    4747    /// <param name="plugins">bytearray of all plugins that should be loaded</param>
    4848    public void LoadPlugins(ICollection<byte[]> plugins) {
    49       foreach (byte[] plugin in plugins)
    50         Assembly.Load(plugin);
     49      foreach (byte[] plugin in plugins) {
     50        Assembly.Load(plugin);       
     51      }
    5152    }
    5253
Note: See TracChangeset for help on using the changeset viewer.