Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5707


Ignore:
Timestamp:
03/16/11 13:31:37 (12 years ago)
Author:
cneumuel
Message:

#1260

  • some changes due to the removal of Disposable (r5706)
  • copy PluginInfrastructure files into PluginCache folder in slaves (needed due to r5703)
Location:
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj

    r5179 r5707  
    140140    <Compile Include="BusinessObjects\SlaveGroupDtoList.cs" />
    141141    <None Include="HeuristicLabHiveContractsPlugin.cs.frame" />
     142    <Compile Include="DisposableWrapper.cs" />
    142143    <Compile Include="MessageContainerWithCallback.cs" />
    143144    <Compile Include="MessageContainerWithJob.cs" />
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/WcfServicePool.cs

    r5588 r5707  
    5858    }
    5959
    60     public Disposable<T> GetService() {
     60    public DisposableWrapper<T> GetService() {
    6161      try {
    6262        if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password)) {
    6363          var factory = ClientFactory.CreateChannelFactory<T>(endpointName, hostAddress, userName, password);
    64           return new Disposable<T>(factory.Obj.CreateChannel());
     64          var disposable = new DisposableWrapper<T>(factory.CreateChannel());
     65          disposable.OnDisposing += new EventHandler<EventArgs<object>>(disposable_OnDisposing);
     66          return disposable;
    6567        } else {
    6668          var factory = ClientFactory.CreateChannelFactory<T>(endpointName, hostAddress);
    67           return new Disposable<T>(factory.Obj.CreateChannel());     
     69          var disposable = new DisposableWrapper<T>(factory.CreateChannel());
     70          disposable.OnDisposing += new EventHandler<EventArgs<object>>(disposable_OnDisposing);
     71          return disposable;
    6872        }
    6973      }
     
    8185      }
    8286    }
     87
     88    private void disposable_OnDisposing(object sender, EventArgs<object> e) {
     89      DisposeCommunicationObject((ICommunicationObject)e.Value);
     90    }
     91
     92    public static void DisposeCommunicationObject(ICommunicationObject obj) {
     93      if (obj != null) {
     94        if (obj.State != CommunicationState.Faulted && obj.State != CommunicationState.Closed) {
     95          try { obj.Close(); }
     96          catch { obj.Abort(); }
     97        } else {
     98          obj.Abort();
     99        }
     100      }
     101    }
    83102  }
    84103}
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperiment.cs

    r5179 r5707  
    3232using HeuristicLab.Hive.ExperimentManager.Jobs;
    3333using HeuristicLab.Hive.Tracing;
    34 using HeuristicLab.Clients.Common;
    3534
    3635namespace HeuristicLab.Hive.ExperimentManager {
     
    227226        this.progress = new Progress("Connecting to server...");
    228227        IsProgressing = true;
    229         using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
     228        using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    230229          IEnumerable<string> groups = ToResourceIdList(this.ResourceIds);
    231230          this.HiveJob.SetIndexInParentOptimizerList(null);
     
    309308
    310309    public void Stop() {
    311       using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
     310      using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    312311        foreach (HiveJob hj in HiveJob.GetAllHiveJobs()) {
    313312          service.Obj.AbortJob(hj.JobDto.Id);
     
    537536
    538537        progress.Status = "Connecting to Server...";
    539         using (Disposable<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
     538        using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
    540539          progress.Status = "Downloading list of jobs...";
    541540          allResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj;
     
    591590
    592591    private OptimizerJob LoadOptimizerJob(Guid jobId) {
    593       using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
     592      using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    594593        ResponseObject<SerializedJob> serializedJob = service.Obj.GetLastSerializedResult(jobId);
    595594        try {
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperimentManager.cs

    r5399 r5707  
    102102          this.HiveExperiments = new HiveExperimentCollection();
    103103        }
    104         using (Disposable<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
     104        using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
    105105          currentlyUpdating = true;
    106106          ResponseObject<HiveExperimentDtoList> response = service.Obj.GetHiveExperiments();
     
    151151    void hiveExperiments_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<HiveExperiment> e) {
    152152      if (!currentlyUpdating) {
    153         using (Disposable<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
     153        using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
    154154          foreach (HiveExperiment item in e.Items) {
    155155            if (item.HiveExperimentId != Guid.Empty) {
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveJobDownloader.cs

    r5329 r5707  
    22using System.Collections.Generic;
    33using System.Linq;
    4 using System.Text;
    5 using HeuristicLab.Hive.ExperimentManager.Jobs;
    64using System.Threading;
    75using System.Threading.Tasks;
     6using HeuristicLab.Hive.Contracts;
    87using HeuristicLab.Hive.Contracts.BusinessObjects;
    98using HeuristicLab.Hive.Contracts.Interfaces;
    10 using HeuristicLab.Clients.Common;
    119
    1210namespace HeuristicLab.Hive.ExperimentManager {
     
    7977      try {
    8078        if (abort) return null;
    81         using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
     79        using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    8280          result = service.Obj.GetLastSerializedResult((Guid)jobId).Obj;
    8381        }
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/JobResultPoller.cs

    r5399 r5707  
    2727using HeuristicLab.Hive.Contracts.Interfaces;
    2828using HeuristicLab.Hive.Contracts.ResponseObjects;
    29 using HeuristicLab.Clients.Common;
    3029
    3130namespace HeuristicLab.Hive.ExperimentManager {
     
    102101        repetitions--;
    103102        try {
    104           using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
     103          using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    105104            response = service.Obj.GetChildJobResults(hiveJob.JobDto.Id, true, true);
    106105          }
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Communication/3.3/WcfService.cs

    r5213 r5707  
    2424using System.IO;
    2525using System.Runtime.Serialization.Formatters.Binary;
    26 using System.ServiceModel;
    2726using HeuristicLab.Common;
    2827using HeuristicLab.Hive.Contracts;
     
    3130using HeuristicLab.Hive.Slave.Common;
    3231using HeuristicLab.Hive.Slave.Communication.SlaveFacade;
     32using HeuristicLab.Hive.Tracing;
    3333using HeuristicLab.PluginInfrastructure;
    34 using HeuristicLab.Hive.Tracing;
    35 using HeuristicLab.Clients.Common;
    3634
    3735namespace HeuristicLab.Hive.Slave.Communication {
     
    7775    public void Connect(SlaveDto slaveInfo) {
    7876      RegisterServiceEvents();
    79       using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     77      using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    8078        try {
    8179          Logger.Debug("Starting the Connection Process");
     
    131129    public event System.EventHandler<EventArgs<Exception>> GetJobFailed;
    132130    public void GetJobAsync(Guid guid) {
    133       Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();
     131      DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();
    134132      Logger.Debug("STARTED: Fetching of Jobs from Server for Slave");
    135133      service.Obj.BeginGetStreamedJob(guid, (ar => {
     
    184182    public event System.EventHandler<StoreFinishedJobResultCompletedEventArgs> GetFinishedJobResultCompleted;
    185183    public void GetFinishedJobResultAsync(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception, bool finished) {
    186       Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();
     184      DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();
    187185      Logger.Debug("STARTED: Sending back the finished job results");
    188186      Logger.Debug("Building stream");
     
    218216    public event System.EventHandler<ProcessSnapshotCompletedEventArgs> ProcessSnapshotCompleted;
    219217    public void ProcessSnapshotAsync(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception, bool finished) {
    220       Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();
     218      DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService();
    221219
    222220      Stream stream = GetStreamedJobResult(clientId, jobId, result, executionTime, exception);
     
    249247    public event EventHandler<ProcessHeartBeatCompletedEventArgs> ProcessHeartBeatCompleted;
    250248    public void ProcessHeartBeatSync(HeartBeatData hbd) {
    251       using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.SlaveFacadePool.GetService()) {
     249      using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.SlaveFacadePool.GetService()) {
    252250        Logger.Debug("STARTING: sending heartbeat");
    253251        var res = service.Obj.ProcessHeartBeat(hbd);
     
    287285
    288286    public ResponseResultReceived StoreFinishedJobResultsSync(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception, bool finished) {
    289       using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     287      using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    290288        ResponseResultReceived res = service.Obj.StoreFinishedJobResultStreamed(GetStreamedJobResult(clientId, jobId, result, executionTime, exception));
    291289        return res;
     
    296294      try {
    297295        Logger.Debug("STARTING: Sync call: IsJobStillNeeded");
    298         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     296        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    299297          Response res = service.Obj.IsJobStillNeeded(jobId);
    300298          Logger.Debug("ENDED: Sync call: IsJobStillNeeded");
     
    310308    public ResponseResultReceived ProcessSnapshotSync(Guid clientId, Guid jobId, byte[] result, TimeSpan executionTime, string exception) {
    311309      try {
    312         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     310        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    313311          return service.Obj.ProcessSnapshotStreamed(GetStreamedJobResult(clientId, jobId, result, executionTime, exception));
    314312        }
     
    322320    public IEnumerable<CachedHivePluginInfoDto> RequestPlugins(List<HivePluginInfoDto> requestedPlugins) {
    323321      try {
    324         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     322        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    325323          Logger.Debug("STARTED: Requesting Plugins for Job");
    326324          Logger.Debug("STARTED: Getting the stream");
     
    345343      try {
    346344        Logger.Debug("STARTED: Logout");
    347         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     345        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    348346          service.Obj.Logout(guid);
    349347        }
     
    358356      try {
    359357        Logger.Debug("STARTED: Syncing Calendars");
    360         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     358        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    361359          ResponseCalendar cal = service.Obj.GetCalendar(clientId);
    362360          Logger.Debug("ENDED: Syncing Calendars");
     
    373371      try {
    374372        Logger.Debug("STARTED: Setting Calendar status to: " + state);
    375         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     373        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    376374          Response resp = service.Obj.SetCalendarStatus(clientId, state);
    377375          Logger.Debug("ENDED: Setting Calendar status to: " + state);
     
    388386      try {
    389387        Logger.Debug("STARTED: Add Child Job for parent: " + parentJobId);
    390         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     388        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    391389          ResponseObject<JobDto> response = service.Obj.AddChildJob(parentJobId, serializedJob);
    392390          Logger.Debug("ENDED: Add Child Job for parent: " + parentJobId);
     
    403401      try {
    404402        Logger.Debug("STARTED: Pausing job: " + serializedJob.JobInfo.Id);
    405         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     403        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    406404          ResponseObject<JobDto> response = service.Obj.PauseJob(serializedJob);
    407405          Logger.Debug("ENDED: Pausing job: " + serializedJob.JobInfo.Id);
     
    418416      try {
    419417        Logger.Debug("STARTED: GetChildJobs job: " + parentJob);
    420         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     418        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    421419          SerializedJobList serializedJobs = new SerializedJobList();
    422420          JobResult[] results = service.Obj.GetChildJobResults(new Guid?(parentJob), false, false);
     
    439437    public void DeleteChildJobs(Guid jobId) {
    440438      try {
    441         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     439        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    442440          service.Obj.DeleteChildJobs(jobId);
    443441        }
     
    450448    public HivePluginFile GetConfigurationFile() {
    451449      try {
    452         using (Disposable<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
     450        using (DisposableWrapper<SlaveFacade.ISlaveFacade> service = ServiceLocator.Instance.StreamedSlaveFacadePool.GetService()) {
    453451          var response = service.Obj.GetConfigurationFile();
    454452          return response.Obj;
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Console/3.3/LogServiceReader.cs

    r5588 r5707  
    44using System.Windows.Forms;
    55using HeuristicLab.Clients.Common;
     6using HeuristicLab.Hive.Contracts;
    67using HeuristicLab.Hive.Slave.Console.SlaveConsoleService;
     8using System.ServiceModel;
    79
    810namespace HeuristicLab.Hive.Slave.Console {
     
    2426    private void timer_Tick(object sender, EventArgs e) {
    2527      try {
    26         using (var factory = ClientFactory.CreateChannelFactory<ISlaveConsoleCommunicator>("SlaveConsoleTcpEndpointClient")) {
     28        using (var factory = new DisposableWrapper<ChannelFactory<ISlaveConsoleCommunicator>>(ClientFactory.CreateChannelFactory<ISlaveConsoleCommunicator>("SlaveConsoleTcpEndpointClient"))) {
    2729          var slaveClient = factory.Obj.CreateChannel();
    2830          try {
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/Core.cs

    r5153 r5707  
    365365        Logger.Info("Received new job with id " + e.Result.Obj.Id);
    366366        Logger.Debug("Fetching plugins for job " + e.Result.Obj.Id);
    367 
     367       
    368368        String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, e.Result.Obj.Id.ToString());
    369369        bool pluginsPrepared = false;
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Slave.Core/3.3/PluginCache.cs

    r5037 r5707  
    2424using System.IO;
    2525using System.Linq;
     26using System.Reflection;
    2627using System.Runtime.CompilerServices;
     28using System.Threading;
    2729using HeuristicLab.Hive.Contracts.BusinessObjects;
    2830using HeuristicLab.Hive.Slave.Communication;
    2931using HeuristicLab.PluginInfrastructure;
    3032using HeuristicLab.PluginInfrastructure.Manager;
    31 using System.Threading;
    32 using System.Reflection;
    3333
    3434namespace HeuristicLab.Hive.Slave.Core {
     
    7171      if (!Directory.Exists(PluginCacheDir)) {
    7272        Directory.CreateDirectory(PluginCacheDir);
     73        string baseDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
     74        CopyPluginInfrastructureFiles(baseDir, PluginCacheDir);
    7375      }
    7476      pm.DiscoverAndCheckPlugins();
     
    104106        // copy files from PluginInfrastructure, which are not declared
    105107        string baseDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
    106         CopyFile(baseDir, targetDir, "HeuristicLab.PluginInfrastructure-3.3.dll");
    107         CopyFile(baseDir, targetDir, "ICSharpCode.SharpZipLib.dll");
    108         CopyFile(baseDir, targetDir, "ICSharpCode.SharpZipLib License.txt");
     108        CopyPluginInfrastructureFiles(baseDir, targetDir);
    109109
    110110        // copy slave plugins, otherwise its not possible to register the UnhandledException handler to the appdomain
    111         CopyFile(baseDir, targetDir, "HeuristicLab.Hive.Slave.Core-3.3.dll");
    112         CopyFile(baseDir, targetDir, "HeuristicLab.Hive.Slave.Common-3.3.dll");
    113         CopyFile(baseDir, targetDir, "HeuristicLab.Hive.Slave.Communication-3.3.dll");
    114         CopyFile(baseDir, targetDir, "HeuristicLab.Hive.Slave.ExecutionEngine-3.3.dll");
    115       }
     111        CopySlaveFiles(baseDir, targetDir);
     112      }
     113    }
     114
     115    private void CopySlaveFiles(string sourceDir, String targetDir) {
     116      CopyFile(sourceDir, targetDir, "HeuristicLab.Hive.Slave.Core-3.3.dll");
     117      CopyFile(sourceDir, targetDir, "HeuristicLab.Hive.Slave.Common-3.3.dll");
     118      CopyFile(sourceDir, targetDir, "HeuristicLab.Hive.Slave.Communication-3.3.dll");
     119      CopyFile(sourceDir, targetDir, "HeuristicLab.Hive.Slave.ExecutionEngine-3.3.dll");
     120    }
     121
     122    private void CopyPluginInfrastructureFiles(string sourceDir, String targetDir) {
     123      CopyFile(sourceDir, targetDir, "HeuristicLab.PluginInfrastructure-3.3.dll");
     124      CopyFile(sourceDir, targetDir, "ICSharpCode.SharpZipLib.dll");
     125      CopyFile(sourceDir, targetDir, "ICSharpCode.SharpZipLib License.txt");
    116126    }
    117127
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.HiveEngine/3.3/HiveEngine.cs

    r5399 r5707  
    22using System.Collections.Generic;
    33using System.Linq;
    4 using System.Text;
     4using System.Threading;
     5using System.Threading.Tasks;
     6using HeuristicLab.Common;
     7using HeuristicLab.Core;
     8using HeuristicLab.Hive.Contracts;
     9using HeuristicLab.Hive.Contracts.BusinessObjects;
     10using HeuristicLab.Hive.Contracts.Interfaces;
     11using HeuristicLab.Hive.Contracts.ResponseObjects;
     12using HeuristicLab.Hive.ExperimentManager;
    513using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    6 using HeuristicLab.Core;
    7 using HeuristicLab.Common;
    8 using HeuristicLab.Hive.Contracts.Interfaces;
    9 using HeuristicLab.Clients.Common;
    10 using HeuristicLab.Hive.ExperimentManager;
    11 using HeuristicLab.Hive.Contracts.BusinessObjects;
    1214using HeuristicLab.PluginInfrastructure;
    13 using HeuristicLab.Hive.Contracts.ResponseObjects;
    14 using System.Threading;
    15 using HeuristicLab.Random;
    16 using System.Threading.Tasks;
    1715
    1816namespace HeuristicLab.HiveEngine {
     
    245243          Thread.Sleep(10000);
    246244          try {
    247             using (Disposable<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
     245            using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
    248246              results = service.Obj.GetJobResults(remainingJobIds).Obj;
    249247            }
     
    312310        TryAndRepeat(() => {
    313311          LogMessage(string.Format("Deleting {0} jobs on hive.", jobIndices.Count));
    314           using (Disposable<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
     312          using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) {
    315313            foreach (Guid jobId in jobIndices.Keys) {
    316314              service.Obj.DeleteJob(jobId);
     
    359357            cancellationToken.ThrowIfCancellationRequested();
    360358            try {
    361               using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
     359              using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    362360                response = service.Obj.AddJobWithGroupStrings(serializedJob, groups);
    363361                serializedJob = null;
     
    390388          cancellationToken.ThrowIfCancellationRequested();
    391389          try {
    392             using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
     390            using (DisposableWrapper<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) {
    393391              serializedJob = service.Obj.GetLastSerializedResult(jobId).Obj;
    394392            }
Note: See TracChangeset for help on using the changeset viewer.