Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/27/10 11:46:46 (14 years ago)
Author:
cneumuel
Message:

changed Slave.Core WCF-Proxy to stateless object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs

    r4333 r4337  
    8989      ConnectionContainer cc = ConfigManager.Instance.GetServerIP();
    9090      if (cc.IPAdress != String.Empty) {
    91         wcfService.SetIP(cc.IPAdress);
     91        wcfService.ServerIp = cc.IPAdress;
    9292      }
    9393    }
     
    112112      wcfService.ProcessSnapshotCompleted += new EventHandler<ProcessSnapshotCompletedEventArgs>(wcfService_ProcessSnapshotCompleted);
    113113      wcfService.ConnectionRestored += new EventHandler(wcfService_ConnectionRestored);
    114       wcfService.ServerChanged += new EventHandler(wcfService_ServerChanged);
     114      //wcfService.ServerChanged += new EventHandler(wcfService_ServerChanged);
    115115      wcfService.Connected += new EventHandler(wcfService_Connected);
    116116    }
     
    121121      wcfService.ProcessSnapshotCompleted -= new EventHandler<ProcessSnapshotCompletedEventArgs>(wcfService_ProcessSnapshotCompleted);
    122122      wcfService.ConnectionRestored -= new EventHandler(wcfService_ConnectionRestored);
    123       wcfService.ServerChanged -= new EventHandler(wcfService_ServerChanged);
     123      //wcfService.ServerChanged -= new EventHandler(wcfService_ServerChanged);
    124124      wcfService.Connected -= new EventHandler(wcfService_Connected);
    125125    }
     
    244244        } else {
    245245          Logger.Info("Storing the finished job with id: " + jId + " to hdd");
    246           JobStorageManager.PersistObjectToDisc(wcfService.ServerIP, 0, jId, sJob); // [chn] Port is not unique anymore (since we need two ports for http and net.tcp-streaming). also the port is now specified only in app.config. use port 0 for the moment
     246          JobStorageManager.PersistObjectToDisc(wcfService.ServerIp, 0, jId, sJob); // [chn] Port is not unique anymore (since we need two ports for http and net.tcp-streaming). also the port is now specified only in app.config. use port 0 for the moment
    247247          KillAppDomain(jId);
    248248        }
     
    382382    }
    383383
    384     /// <summary>
    385     /// The server has been changed. All Appdomains and Jobs must be aborted!
    386     /// </summary>
    387     /// <param name="sender"></param>
    388     /// <param name="e"></param>
    389     void wcfService_ServerChanged(object sender, EventArgs e) {
    390       Logger.Info("ServerChanged has been called");
    391       lock (engines) {
    392         foreach (KeyValuePair<Guid, Executor> entries in engines) {
    393           engines[entries.Key].Abort();
    394           //appDomains[entries.Key].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException);
    395           //AppDomain.Unload(appDomains[entries.Key]);
    396         }
    397         //appDomains = new Dictionary<Guid, AppDomain>();
    398         //engines = new Dictionary<Guid, Executor>();
    399         //jobs = new Dictionary<Guid, Job>();
    400       }
    401     }
    402384
    403385    /// <summary>
     
    417399      Logger.Info("CalendarAvailable is " + UptimeManager.Instance.CalendarAvailable + " and IsOnline is: " + UptimeManager.Instance.IsAllowedToCalculate());
    418400      Logger.Info("Setting client online");
    419       wcfService.LoginSync(ConfigManager.Instance.GetClientInfo());
     401      wcfService.Login(ConfigManager.Instance.GetClientInfo());
    420402      JobStorageManager.CheckAndSubmitJobsFromDisc();
    421403      CurrentlyFetching = false;
    422       //}
    423404    }
    424405
Note: See TracChangeset for help on using the changeset viewer.