Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/12 13:31:40 (12 years ago)
Author:
spimming
Message:

#1888:

  • Change hive server from service configuration file
  • Created service configuration settings for server address and certificate
  • Added HeuristicLab.Clients.Hive-3.3 project to solution
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.AzureClient/3.3/WorkerRole.cs

    r8242 r8251  
    3232    private Thread coreThread;
    3333
     34    private const string HiveServerAddressSetting = "HiveServerAddress";
     35    private const string HiveServerCertificateSetting = "HiveServerCertifcateEncodedValue";
     36
    3437    public override void Run() {
    3538      core = new Core(false);
     39
     40      string hiveServerAddress = RoleEnvironment.GetConfigurationSettingValue(HiveServerAddressSetting);
     41      string hiveServerCertificate = RoleEnvironment.GetConfigurationSettingValue(HiveServerCertificateSetting);
     42
     43      // values are empty, settings from app.config are used
     44      if (!string.IsNullOrEmpty(hiveServerAddress) && !string.IsNullOrEmpty(hiveServerCertificate)) {
     45        core.SetNewHiveServer(hiveServerAddress, hiveServerCertificate);
     46      }
     47
    3648      coreThread = new Thread(core.Start);
    3749      coreThread.Start();
     
    5971      }
    6072
     73      RoleEnvironment.Changed += RoleEnvironmentChanged;
     74
    6175      return base.OnStart();
    6276    }
     
    6680      base.OnStop();
    6781    }
     82
     83    private void RoleEnvironmentChanged(object sender, RoleEnvironmentChangedEventArgs e) {
     84    }
    6885  }
    6986}
Note: See TracChangeset for help on using the changeset viewer.