Changeset 4905 for branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive
- Timestamp:
- 11/22/10 17:13:27 (14 years ago)
- Location:
- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New
- Files:
-
- 2 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New
- Property svn:ignore
-
old new 1 1 *.suo 2 Tests
-
- Property svn:ignore
-
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive/3.3/HeuristicLab.Clients.Hive-3.3.csproj
r4796 r4905 45 45 <HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> 46 46 </Reference> 47 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.2.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 47 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 48 <SpecificVersion>False</SpecificVersion> 49 <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common.Resources-3.3.dll</HintPath> 50 </Reference> 48 51 <Reference Include="HeuristicLab.Core-3.3"> 49 52 <HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath> … … 61 64 <HintPath>..\..\..\..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 62 65 </Reference> 63 <Reference Include="HeuristicLab.Tracing-3.3, Version=3.2.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 66 <Reference Include="HeuristicLab.Tracing-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 67 <SpecificVersion>False</SpecificVersion> 68 <HintPath>..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Tracing-3.3.dll</HintPath> 69 </Reference> 64 70 <Reference Include="System" /> 65 71 <Reference Include="System.Core" /> … … 76 82 <Compile Include="Exceptions\JobResultPollingException.cs" /> 77 83 <Compile Include="Exceptions\OptimizerNotFoundException.cs" /> 84 <Compile Include="HiveExperiment\PluginClient.cs" /> 78 85 <Compile Include="Jobs\OptimizerJob.cs" /> 79 86 <Compile Include="HeuristicLabClientsHivePlugin.cs" /> 80 <Compile Include="HiveExperiment\Hive Client.cs" />87 <Compile Include="HiveExperiment\HiveExperimentManagerClient.cs" /> 81 88 <Compile Include="HiveExperiment\HiveJobClient.cs" /> 82 89 <Compile Include="HiveExperiment\HiveExperimentClient.cs" /> … … 99 106 <None Include="ServiceClients\GenerateServiceClients.cmd" /> 100 107 <None Include="Properties\Settings.settings"> 101 <Generator> SettingsSingleFileGenerator</Generator>108 <Generator>PublicSettingsSingleFileGenerator</Generator> 102 109 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 103 110 </None> -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive/3.3/HiveExperiment/HiveExperimentClient.cs
r4796 r4905 44 44 private const string itemDescription = "A runner for a single experiment, which's algorithms are executed in the Hive."; 45 45 private System.Timers.Timer timer; 46 private DateTime lastUpdateTime; 47 private Guid? rootJobId; 48 private JobResultPoller jobResultPoller; 46 49 47 50 private Guid hiveExperimentId; … … 69 72 } 70 73 71 private DateTime lastUpdateTime;72 73 74 private string resourceIds; 74 75 public string ResourceIds { … … 82 83 } 83 84 84 private Guid? rootJobId;85 86 85 private bool isPollingResults; 87 86 public bool IsPollingResults { … … 111 110 } 112 111 113 private JobResultPoller jobResultPoller; 114 115 116 public HiveExperimentClient() 117 : base(itemName, itemDescription) { 118 //this.ResourceIds = HeuristicLab.Hive.Experiment.Properties.Settings.Default.ResourceIds; 112 public HiveExperimentClient() : base(itemName, itemDescription) { 113 // TODO //this.ResourceIds = HeuristicLab.Hive.Experiment.Properties.Settings.Default.ResourceIds; 119 114 this.ResourceIds = "MyGroup"; 120 115 this.log = new Log(); 121 116 InitTimer(); 122 117 } 123 public HiveExperimentClient(DT.HiveExperiment hiveExperimentDto) 124 : this() { 118 public HiveExperimentClient(DT.HiveExperiment hiveExperimentDto) : this() { 125 119 UpdateFromDto(hiveExperimentDto); 126 120 } 127 121 protected HiveExperimentClient(HiveExperimentClient original, Cloner cloner) 128 122 : base(original, cloner) { 129 this. resourceIds = original.resourceIds;130 this. executionState = original.executionState;131 this. executionTime = original.executionTime;123 this.ResourceIds = original.resourceIds; 124 this.ExecutionState = original.executionState; 125 this.ExecutionTime = original.executionTime; 132 126 this.log = cloner.Clone(original.log); 133 127 this.lastUpdateTime = original.lastUpdateTime; … … 137 131 return new HiveExperimentClient(this, cloner); 138 132 } 139 140 133 141 134 public void UpdateFromDto(DT.HiveExperiment hiveExperimentDto) { … … 143 136 this.Name = hiveExperimentDto.Name; 144 137 this.Description = hiveExperimentDto.Description; 145 // this.ResourceIds = hiveExperimentDto.ResourceIds;138 // TODO: this.ResourceIds = hiveExperimentDto.ResourceIds; 146 139 this.rootJobId = hiveExperimentDto.RootJobId; 147 140 } … … 270 263 jobCount++; 271 264 this.progress.Status = string.Format("Serializing job {0} of {1}", jobCount, totalJobCount); 272 JobData serializedJob;265 JobData jobData; 273 266 if (hiveJob.OptimizerJob.ComputeInParallel && 274 267 (hiveJob.OptimizerJob.Optimizer is Optimization.Experiment || hiveJob.OptimizerJob.Optimizer is Optimization.BatchRun)) { 275 268 hiveJob.Job.JobState = JobState.WaitingForChildJobs; 276 269 hiveJob.OptimizerJob.CollectChildJobs = false; // don't collect child-jobs on slaves 277 serializedJob = hiveJob.GetAsSerializedJob(true);270 jobData = hiveJob.GetAsJobData(true); 278 271 } else { 279 serializedJob = hiveJob.GetAsSerializedJob(false);280 } 281 282 this.progress.Status = string.Format("Uploading job {0} of {1} ({2} kb)", jobCount, totalJobCount, serializedJob.Data.Count() / 1024);272 jobData = hiveJob.GetAsJobData(false); 273 } 274 275 this.progress.Status = string.Format("Uploading job {0} of {1} ({2} kb)", jobCount, totalJobCount, jobData.Data.Count() / 1024); 283 276 this.progress.ProgressValue = (double)jobCount / totalJobCount; 284 277 285 278 if (parentHiveJob != null) { 286 279 //response = service.AddChildJob(parentHiveJob.Job.Id, serializedJob); 287 hiveJob.Job.Id = service.AddChildJob(parentHiveJob.Job.Id, hiveJob.Job, serializedJob);280 hiveJob.Job.Id = service.AddChildJob(parentHiveJob.Job.Id, hiveJob.Job, jobData); 288 281 } else { 289 282 // response = service.AddJobWithGroupStrings(serializedJob, groups); 290 hiveJob.Job.Id = service.AddJob(hiveJob.Job, serializedJob);283 hiveJob.Job.Id = service.AddJob(hiveJob.Job, jobData); 291 284 } 292 285 … … 467 460 LogMessage(hj.Job.Id, "Downloading optimizer for job"); 468 461 OptimizerJob optimizerJob = LoadOptimizerJob(hj.Job.Id); 469 if ( lightweightJob.ParentJobId.HasValue) {470 HiveJob parentHiveJob = HiveJob.GetHiveJobByJobId(lightweightJob.ParentJobId.Value);471 parentHiveJob.UpdateChildOptimizer(optimizerJob, hj.Job.Id);462 if (optimizerJob == null) { 463 // something bad happened to this job. set to finished to allow the rest beeing downloaded 464 hj.IsFinishedOptimizerDownloaded = true; 472 465 } else { 473 this.HiveJob.IsFinishedOptimizerDownloaded = true; 466 if (lightweightJob.ParentJobId.HasValue) { 467 HiveJob parentHiveJob = HiveJob.GetHiveJobByJobId(lightweightJob.ParentJobId.Value); 468 parentHiveJob.UpdateChildOptimizer(optimizerJob, hj.Job.Id); 469 } else { 470 this.HiveJob.IsFinishedOptimizerDownloaded = true; 471 } 474 472 } 475 473 } … … 541 539 // download them first 542 540 IDictionary<Guid, Job> allJobs = new Dictionary<Guid, Job>(); 543 IDictionary<Guid, JobData> all SerializedJobs = new Dictionary<Guid, JobData>();541 IDictionary<Guid, JobData> allJobDatas = new Dictionary<Guid, JobData>(); 544 542 foreach (LightweightJob lightweightJob in allResults) { 545 543 jobCount++; 546 544 progress.Status = string.Format("Downloading {0} of {1} jobs...", jobCount, totalJobCount); 547 545 allJobs.Add(lightweightJob.Id, service.Obj.GetJob(lightweightJob.Id)); 548 all SerializedJobs.Add(lightweightJob.Id, service.Obj.GetJobData(lightweightJob.Id));546 allJobDatas.Add(lightweightJob.Id, service.Obj.GetJobData(lightweightJob.Id)); 549 547 progress.ProgressValue = (double)jobCount / totalJobCount; 550 548 } 551 549 552 550 jobCount = 1; 553 progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, all SerializedJobs[this.rootJobId.Value].Data.Count() / 1024);554 this.HiveJob = new HiveJob(allJobs[this.rootJobId.Value], all SerializedJobs[this.rootJobId.Value], false);555 all SerializedJobs.Remove(this.rootJobId.Value); // reduce memory footprint551 progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, allJobDatas[this.rootJobId.Value].Data.Count() / 1024); 552 this.HiveJob = new HiveJob(allJobs[this.rootJobId.Value], allJobDatas[this.rootJobId.Value], false); 553 allJobDatas.Remove(this.rootJobId.Value); // reduce memory footprint 556 554 allJobs.Remove(this.rootJobId.Value); 557 555 progress.ProgressValue = (double)jobCount / totalJobCount; … … 570 568 571 569 // build child-job tree 572 LoadChildResults(service.Obj, this.HiveJob, allResults, allJobs, all SerializedJobs, progress, totalJobCount, ref jobCount);570 LoadChildResults(service.Obj, this.HiveJob, allResults, allJobs, allJobDatas, progress, totalJobCount, ref jobCount); 573 571 StartResultPolling(); 574 572 } … … 582 580 } 583 581 584 private void LoadChildResults(IHiveService service, HiveJob parentHiveJob, IEnumerable<LightweightJob> allResults, IDictionary<Guid, Job> allJobs, IDictionary<Guid, JobData> all SerializedJobs, IProgress progress, int totalJobCount, ref int jobCount) {582 private void LoadChildResults(IHiveService service, HiveJob parentHiveJob, IEnumerable<LightweightJob> allResults, IDictionary<Guid, Job> allJobs, IDictionary<Guid, JobData> allJobDatas, IProgress progress, int totalJobCount, ref int jobCount) { 585 583 IEnumerable<LightweightJob> childResults = from result in allResults 586 584 where result.ParentJobId.HasValue && result.ParentJobId.Value == parentHiveJob.Job.Id … … 589 587 foreach (LightweightJob lightweightJob in childResults) { 590 588 jobCount++; 591 progress.Status = string.Format("Deserializing {0} of {1} jobs ({2} kb)...", jobCount, totalJobCount, allSerializedJobs[lightweightJob.Id].Data.Count() / 1024); 592 OptimizerJob optimizerJob = PersistenceUtil.Deserialize<OptimizerJob>(allSerializedJobs[lightweightJob.Id].Data); 589 progress.Status = string.Format("Deserializing {0} of {1} jobs ({2} kb)...", jobCount, totalJobCount, allJobDatas[lightweightJob.Id].Data.Count() / 1024); 590 OptimizerJob optimizerJob = null; 591 try { 592 optimizerJob = PersistenceUtil.Deserialize<OptimizerJob>(allJobDatas[lightweightJob.Id].Data); 593 } 594 catch { 595 optimizerJob = null; 596 } 593 597 progress.ProgressValue = (double)jobCount / totalJobCount; 594 598 HiveJob childHiveJob = new HiveJob(optimizerJob, false); 595 599 parentHiveJob.AddChildHiveJob(childHiveJob); 596 600 childHiveJob.Job = allJobs[lightweightJob.Id]; 597 all SerializedJobs.Remove(lightweightJob.Id); // reduce memory footprint601 allJobDatas.Remove(lightweightJob.Id); // reduce memory footprint 598 602 allJobs.Remove(lightweightJob.Id); 599 603 if (jobCount % 10 == 0) GC.Collect(); // this is needed or otherwise HL takes over the system when the number of jobs is high 600 LoadChildResults(service, childHiveJob, allResults, allJobs, all SerializedJobs, progress, totalJobCount, ref jobCount);604 LoadChildResults(service, childHiveJob, allResults, allJobs, allJobDatas, progress, totalJobCount, ref jobCount); 601 605 } 602 606 } … … 604 608 private OptimizerJob LoadOptimizerJob(Guid jobId) { 605 609 using (var service = ServiceLocator.Instance.ServicePool.GetService()) { 606 JobData serializedJob = service.Obj.GetJobData(jobId); 607 return PersistenceUtil.Deserialize<OptimizerJob>(serializedJob.Data); 610 JobData jobData = service.Obj.GetJobData(jobId); 611 try { 612 return PersistenceUtil.Deserialize<OptimizerJob>(jobData.Data); 613 } 614 catch { 615 return null; 616 } 608 617 } 609 618 } -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive/3.3/HiveExperiment/HiveJobClient.cs
r4796 r4905 31 31 using HeuristicLab.Services.Hive.Common.DataTransfer; 32 32 using HeuristicLab.Clients.Hive.Jobs; 33 using HeuristicLab.PluginInfrastructure; 34 using System.IO; 35 using HeuristicLab.PluginInfrastructure.Manager; 33 36 34 37 namespace HeuristicLab.Clients.Hive { 35 38 39 [Item("Hive Job", "Represents a hive job.")] 36 40 public class HiveJob : Item { 37 41 private static object locker = new object(); … … 136 140 } 137 141 138 public HiveJob(Job job, JobData serializedJob, bool autoCreateChildHiveJobs)142 public HiveJob(Job job, JobData jobData, bool autoCreateChildHiveJobs) 139 143 : this() { 140 144 this.syncJobsWithOptimizers = autoCreateChildHiveJobs; 141 145 this.Job = job; 142 this.OptimizerJob = PersistenceUtil.Deserialize<OptimizerJob>(serializedJob.Data); 146 try { 147 this.OptimizerJob = PersistenceUtil.Deserialize<OptimizerJob>(jobData.Data); 148 } 149 catch { 150 this.OptimizerJob = null; 151 } 143 152 this.syncJobsWithOptimizers = true; 144 153 } … … 193 202 batchRun.AlgorithmChanged += new EventHandler(batchRun_AlgorithmChanged); 194 203 } 195 196 204 OptimizerJob.ComputeInParallelChanged += new EventHandler(OptimizerJob_ComputeInParallelChanged); 197 205 OptimizerJob.ToStringChanged += new EventHandler(OptimizerJob_ToStringChanged); … … 199 207 } 200 208 private void DergisterOptimizerEvents() { 201 if ( Job != null && OptimizerJob.Optimizer is Optimization.Experiment) {209 if (OptimizerJob != null) { 202 210 if (OptimizerJob.Optimizer is Optimization.Experiment) { 203 211 Optimization.Experiment experiment = OptimizerJob.OptimizerAsExperiment; … … 211 219 batchRun.AlgorithmChanged -= new EventHandler(batchRun_AlgorithmChanged); 212 220 } 213 214 221 OptimizerJob.ComputeInParallelChanged -= new EventHandler(OptimizerJob_ComputeInParallelChanged); 215 222 OptimizerJob.ToStringChanged -= new EventHandler(OptimizerJob_ToStringChanged); … … 285 292 this.childHiveJobs.Add(hiveJob); 286 293 syncJobsWithOptimizers = false; 287 if (this.OptimizerJob.Optimizer is Optimization.Experiment) { 288 if (!this.OptimizerJob.OptimizerAsExperiment.Optimizers.Contains(hiveJob.OptimizerJob.Optimizer)) { 289 UpdateOptimizerInExperiment(this.OptimizerJob.OptimizerAsExperiment, hiveJob.OptimizerJob); 290 } 291 } else if (this.OptimizerJob.Optimizer is Optimization.BatchRun) { 292 UpdateOptimizerInBatchRun(this.OptimizerJob.OptimizerAsBatchRun, hiveJob.OptimizerJob); 294 if (this.OptimizerJob != null && hiveJob.OptimizerJob != null) { 295 if (this.OptimizerJob.Optimizer is Optimization.Experiment) { 296 if (!this.OptimizerJob.OptimizerAsExperiment.Optimizers.Contains(hiveJob.OptimizerJob.Optimizer)) { 297 UpdateOptimizerInExperiment(this.OptimizerJob.OptimizerAsExperiment, hiveJob.OptimizerJob); 298 } 299 } else if (this.OptimizerJob.Optimizer is Optimization.BatchRun) { 300 UpdateOptimizerInBatchRun(this.OptimizerJob.OptimizerAsBatchRun, hiveJob.OptimizerJob); 301 } 293 302 } 294 303 syncJobsWithOptimizers = true; … … 305 314 bool childIsFinishedOptimizerDownloaded = false; 306 315 307 if (this.OptimizerJob.Optimizer is Optimization.Experiment) { 308 UpdateOptimizerInExperiment(this.OptimizerJob.OptimizerAsExperiment, optimizerJob); 309 childIsFinishedOptimizerDownloaded = true; 310 } else if (this.OptimizerJob.Optimizer is Optimization.BatchRun) { 311 UpdateOptimizerInBatchRun(this.OptimizerJob.OptimizerAsBatchRun, optimizerJob); 312 if (this.OptimizerJob.OptimizerAsBatchRun.Repetitions == this.OptimizerJob.Optimizer.Runs.Count) { 316 if (this.OptimizerJob != null && this.OptimizerJob.Optimizer != null) { 317 if (this.OptimizerJob.Optimizer is Optimization.Experiment) { 318 UpdateOptimizerInExperiment(this.OptimizerJob.OptimizerAsExperiment, optimizerJob); 313 319 childIsFinishedOptimizerDownloaded = true; 314 } 315 } else { 316 childIsFinishedOptimizerDownloaded = optimizerJob.Optimizer.ExecutionState == ExecutionState.Stopped; 320 } else if (this.OptimizerJob.Optimizer is Optimization.BatchRun) { 321 UpdateOptimizerInBatchRun(this.OptimizerJob.OptimizerAsBatchRun, optimizerJob); 322 if (this.OptimizerJob.OptimizerAsBatchRun.Repetitions == this.OptimizerJob.Optimizer.Runs.Count) { 323 childIsFinishedOptimizerDownloaded = true; 324 } 325 } else { 326 childIsFinishedOptimizerDownloaded = optimizerJob.Optimizer.ExecutionState == ExecutionState.Stopped; 327 } 317 328 } 318 329 … … 411 422 412 423 /// <summary> 413 /// Creates a SerializedJobobject containing the Job and the IJob-Object as byte[]424 /// Creates a JobData object containing the Job and the IJob-Object as byte[] 414 425 /// </summary> 415 426 /// <param name="withoutChildOptimizers"> 416 427 /// if true the Child-Optimizers will not be serialized (if the job contains an Experiment) 417 428 /// </param> 418 public JobData GetAsSerializedJob(bool withoutChildOptimizers) { 429 public JobData GetAsJobData(bool withoutChildOptimizers) { 430 if (this.optimizerJob == null || this.optimizerJob.Optimizer == null) 431 return null; 432 419 433 byte[] jobByteArray; 420 434 if (withoutChildOptimizers && this.OptimizerJob.Optimizer is Optimization.Experiment) { … … 435 449 UpdateRequiredPlugins(); 436 450 437 JobData serializedJob= new JobData() {451 JobData jobData = new JobData() { 438 452 JobId = job.Id, 439 453 Data = jobByteArray 440 454 }; 441 455 442 return serializedJob;456 return jobData; 443 457 } 444 458 … … 447 461 /// </summary> 448 462 private void UpdateRequiredPlugins() { 449 //this.Job.PluginsNeeded = HivePluginInfoDto.FindPluginsNeeded(optimizerJob.GetType()); 450 throw new NotImplementedException(); 463 List<Guid> pluginList = new List<Guid>(); 464 465 IEnumerable<IPluginDescription> neededPlugins = ApplicationManager.Manager.Plugins; //HivePluginInfoDto.FindPluginsNeeded(optimizerJob.GetType()); 466 using (var service = ServiceLocator.Instance.ServicePool.GetService()) { 467 IEnumerable<Plugin> availablePlugins = service.Obj.GetAvailablePlugins(); 468 foreach (IPluginDescription neededPlugin in neededPlugins) { 469 Plugin found = availablePlugins.Where(availablePlugin => availablePlugin.Name == neededPlugin.Name && availablePlugin.Version.Major == neededPlugin.Version.Major && availablePlugin.Version.Minor == neededPlugin.Version.Minor && availablePlugin.Version.Revision == neededPlugin.Version.Revision && availablePlugin.Version.MinorRevision == neededPlugin.Version.MinorRevision).SingleOrDefault(); 470 if (found != null) { 471 pluginList.Add(found.Id); 472 } else { 473 Plugin p = new Plugin() { Name = neededPlugin.Name, Version = neededPlugin.Version }; 474 List<PluginData> pluginDatas = new List<PluginData>(); 475 476 foreach (IPluginFile pf in neededPlugin.Files) { 477 PluginData pluginData = new PluginData(); 478 479 pluginData.Data = File.ReadAllBytes(pf.Name); 480 pluginDatas.Add(pluginData); 481 } 482 pluginList.Add(service.Obj.AddPlugin(p, pluginDatas)); 483 } 484 } 485 } 486 this.Job.PluginsNeededIds = pluginList; 451 487 } 452 488 -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive/3.3/Properties/Settings.Designer.cs
r4629 r4905 14 14 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 15 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 internalsealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {16 public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 17 18 18 private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive/3.3/ServiceLocator.cs
r4629 r4905 24 24 25 25 namespace HeuristicLab.Clients.Hive { 26 internalclass ServiceLocator {26 public class ServiceLocator { 27 27 private static ServiceLocator instance = null; 28 28 private ServiceClientFactory<IHiveService> serviceFactory = null; … … 51 51 get { 52 52 if (serviceFactory == null) { 53 serviceFactory = new ServiceClientFactory<IHiveService>(Settings.Default.HiveUsername, Settings.Default.HivePassword, " TcpEndpoint");53 serviceFactory = new ServiceClientFactory<IHiveService>(Settings.Default.HiveUsername, Settings.Default.HivePassword, "wsHttpBinding_IHiveService"); 54 54 } 55 55 return serviceFactory; -
branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Clients.Hive/3.3/app.config
r4649 r4905 4 4 <bindings> 5 5 <wsHttpBinding> 6 <binding name="HttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" 7 receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" 8 transactionFlow="false" hostNameComparisonMode="StrongWildcard" 9 maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 10 messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 11 allowCookies="false"> 12 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 13 maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 14 <reliableSession ordered="true" inactivityTimeout="00:10:00" 15 enabled="false" /> 16 <security mode="Message"> 17 <transport clientCredentialType="Windows" proxyCredentialType="None" 18 realm="" /> 19 <message clientCredentialType="Windows" negotiateServiceCredential="true" 20 algorithmSuite="Default" /> 21 </security> 6 <binding name="wsHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> 7 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/> 8 <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/> 9 <security mode="Message"> 10 <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/> 11 <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default"/> 12 </security> 22 13 </binding> 23 </wsHttpBinding>24 </bindings>14 </wsHttpBinding> 15 </bindings> 25 16 <client> 26 <endpoint address="http://localhost:9000/HiveService" binding="wsHttpBinding" 27 bindingConfiguration="HttpBinding" contract="HeuristicLab.Clients.Hive.IHiveService" 28 name="HttpBinding"> 29 <identity> 30 <userPrincipalName value="S0920454044@hagenberg.fhooe.at" /> 31 </identity> 17 <endpoint address="http://localhost:9000/Hive-3.3" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding" contract="HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService" name="wsHttpBinding_IHiveService"> 18 <identity> 19 <certificate encodedValue="AwAAAAEAAAAUAAAAfEKvcVixnJay+q4hCPFuO0JL5TQgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMTAxOTEwNTMxNVoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXwC5TGcAffd/0oAWHtm0s6YXVXEgXgb1AYmBkkkhkKIFJG/e/Z0KSYbJepmSJD44W3oOAVm+x1DAsZxU79HahDYgWCuHLMm1TLpwSmYOQ0kV3pGHWHhiWV7h7oGLds/eqZ2EOpaNGryfEPnrA4VmxY91vV5/2BTeVSWG6F8lRKQIDAQABo0kwRzBFBgNVHQEEPjA8gBAR7kBnMRHO5gzThEqda0wWoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQADgYEAoPwEG4QTDXhlxERNDfsZmM2IhEpV42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac="/> 20 </identity> 32 21 </endpoint> 33 22 </client>
Note: See TracChangeset
for help on using the changeset viewer.