Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConfigManager.cs	(revision 6168)
@@ -113,12 +113,5 @@
 
     public int GetUsedCores() {
-      Dictionary<Guid, Executor> engines = Core.Executors;
-      Dictionary<Guid, Job> jobs = Core.Jobs;
-      int usedCores = 0;
-      lock (engines) {
-        foreach (KeyValuePair<Guid, Job> kvp in jobs)
-          usedCores += kvp.Value.CoresNeeded;
-      }
-      return usedCores;
+      return Core.GetCoresNeeded();
     }
 
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs	(revision 6168)
@@ -24,4 +24,5 @@
 using System.Diagnostics;
 using System.IO;
+using System.Linq;
 using System.ServiceModel;
 using System.Threading;
@@ -46,5 +47,4 @@
     private Dictionary<Guid, Executor> executors = new Dictionary<Guid, Executor>();
     private Dictionary<Guid, AppDomain> appDomains = new Dictionary<Guid, AppDomain>();
-    private Dictionary<Guid, Job> jobs = new Dictionary<Guid, Job>();
 
     private WcfService wcfService;
@@ -57,8 +57,4 @@
     public Dictionary<Guid, Executor> Executors {
       get { return executors; }
-    }
-
-    internal Dictionary<Guid, Job> Jobs {
-      get { return jobs; }
     }
 
@@ -163,9 +159,4 @@
               Job job = wcfService.GetJob(jobId);
               if (job == null) throw new JobNotFoundException(jobId);
-              lock (executors) {
-                if (!jobs.ContainsKey(job.Id)) {
-                  jobs.Add(job.Id, job);
-                }
-              }
               JobData jobData = wcfService.GetJobData(job.Id);
               if (jobData == null) throw new JobDataNotFoundException(jobId);
@@ -220,10 +211,10 @@
 
     private void DoPauseJob(Guid jobId) {
-      if (!Jobs.ContainsKey(jobId)) {
+      if (!executors.ContainsKey(jobId)) {
         clientCom.LogMessage("DoPauseJob: Can't find job with id " + jobId);
       } else {
-        Job job = Jobs[jobId];
-
-        if (job != null) {
+        Job job = wcfService.GetJob(jobId);
+
+        if (job != null && executors.ContainsKey(job.Id)) {
           executors[job.Id].Pause();
           JobData sJob = executors[job.Id].GetPausedJob();
@@ -251,8 +242,8 @@
 
     private void DoStopJob(Guid jobId) {
-      if (!Jobs.ContainsKey(jobId)) {
+      if (!executors.ContainsKey(jobId)) {
         clientCom.LogMessage("DoStopJob: Can't find job with id " + jobId);
       } else {
-        Job job = Jobs[jobId];
+        Job job = wcfService.GetJob(jobId);
 
         if (job != null) {
@@ -260,5 +251,4 @@
           JobData sJob = executors[job.Id].GetFinishedJob();
           job.ExecutionTime = executors[job.Id].ExecutionTime;
-
 
           try {
@@ -268,5 +258,5 @@
             SlaveStatusInfo.JobsAborted++;
 
-            clientCom.LogMessage("Sending the stoppped job with id: " + job.Id);
+            clientCom.LogMessage("Sending the stopped job with id: " + job.Id);
             wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Aborted);
           }
@@ -285,13 +275,11 @@
     /// </summary>
     private void DoAbortAll() {
-      List<Guid> guids = new List<Guid>();
-      foreach (Guid job in Jobs.Keys) {
-        guids.Add(job);
-      }
-
-      foreach (Guid g in guids) {
-        KillAppDomain(g);
-      }
-
+      List<Guid> jobIds;
+      lock (executors) {
+        jobIds = new List<Guid>(executors.Keys);
+      }
+      foreach (Guid jobId in jobIds) {
+        KillAppDomain(jobId);
+      }
       clientCom.LogMessage("Aborted all jobs!");
     }
@@ -304,11 +292,11 @@
 
       //copy guids because there will be removed items from 'Jobs'
-      List<Guid> guids = new List<Guid>();
-      foreach (Guid job in Jobs.Keys) {
-        guids.Add(job);
-      }
-
-      foreach (Guid g in guids) {
-        DoPauseJob(g);
+      List<Guid> jobIds;
+      lock (executors) {
+        jobIds = new List<Guid>(Executors.Keys);
+      }
+
+      foreach (Guid jobId in jobIds) {
+        DoPauseJob(jobId);
       }
     }
@@ -321,11 +309,11 @@
 
       //copy guids because there will be removed items from 'Jobs'
-      List<Guid> guids = new List<Guid>();
-      foreach (Guid job in Jobs.Keys) {
-        guids.Add(job);
-      }
-
-      foreach (Guid g in guids) {
-        DoStopJob(g);
+      List<Guid> jobIds;
+      lock (executors) {
+        jobIds = new List<Guid>(executors.Keys);
+      }
+
+      foreach (Guid jobId in jobIds) {
+        DoStopJob(jobId);
       }
     }
@@ -395,8 +383,8 @@
     /// </summary>
     public void PauseWaitJob(JobData data) {
-      if (!Jobs.ContainsKey(data.JobId)) {
+      if (!Executors.ContainsKey(data.JobId)) {
         clientCom.LogMessage("Can't find job with id " + data.JobId);
       } else {
-        Job job = Jobs[data.JobId];
+        Job job = wcfService.GetJob(data.JobId);
         wcfService.UpdateJobData(job, data, ConfigManager.Instance.GetClientInfo().Id, JobState.Paused);
         wcfService.UpdateJobState(job.Id, JobState.Waiting, null);
@@ -416,10 +404,10 @@
           return;
         }
-        if (!jobs.ContainsKey(jobId)) {
+        if (!executors.ContainsKey(jobId)) {
           clientCom.LogMessage("Job doesn't exist");
           return;
         }
-        Job cJob = jobs[jobId];
-        cJob.ExecutionTime = executors[jobId].ExecutionTime;
+        Job job = wcfService.GetJob(jobId);
+        job.ExecutionTime = executors[jobId].ExecutionTime;
 
         if (executors[jobId].Aborted) {
@@ -436,5 +424,5 @@
         try {
           clientCom.LogMessage("Sending the finished job with id: " + jobId);
-          wcfService.UpdateJobData(cJob, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Finished);
+          wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Finished);
         }
         catch (Exception e) {
@@ -456,64 +444,60 @@
     /// A new Job from the wcfService has been received and will be started within a AppDomain.
     /// </summary>    
-    private void StartJobInAppDomain(Job myJob, JobData jobData) {
-      clientCom.LogMessage("Received new job with id " + myJob.Id);
+    private void StartJobInAppDomain(Job job, JobData jobData) {
+      clientCom.LogMessage("Received new job with id " + job.Id);
       clientCom.StatusChanged(ConfigManager.Instance.GetStatusForClientConsole());
 
       lock (startInAppDomainLocker) {
-        if (executors.ContainsKey(myJob.Id)) {
-          clientCom.LogMessage("Job with key " + myJob.Id + " already exists. Job will be ignored.");
+        if (executors.ContainsKey(job.Id)) {
+          clientCom.LogMessage("Job with key " + job.Id + " already exists. Job will be ignored.");
           return;
         }
 
-        String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, myJob.Id.ToString());
+        String pluginDir = Path.Combine(PluginCache.Instance.PluginTempBaseDir, job.Id.ToString());
         bool pluginsPrepared = false;
         string configFileName = string.Empty;
 
         try {
-          PluginCache.Instance.PreparePlugins(myJob, out configFileName);
-          clientCom.LogMessage("Plugins fetched for job " + myJob.Id);
+          PluginCache.Instance.PreparePlugins(job, out configFileName);
+          clientCom.LogMessage("Plugins fetched for job " + job.Id);
           pluginsPrepared = true;
         }
         catch (Exception exception) {
-          clientCom.LogMessage(string.Format("Copying plugins for job {0} failed: {1}", myJob.Id, exception));
-          wcfService.UpdateJobState(myJob.Id, JobState.Failed, exception.ToString());
+          clientCom.LogMessage(string.Format("Copying plugins for job {0} failed: {1}", job.Id, exception));
+          wcfService.UpdateJobState(job.Id, JobState.Failed, exception.ToString());
           SlaveStatusInfo.JobsAborted++;
-          lock (executors) {
-            if (jobs.ContainsKey(myJob.Id)) {
-              jobs.Remove(myJob.Id);
-            }
-          }
         }
 
         if (pluginsPrepared) {
           try {
-            AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(myJob.Id.ToString(), pluginDir, Path.Combine(pluginDir, configFileName));
+            AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(job.Id.ToString(), pluginDir, Path.Combine(pluginDir, configFileName));
             appDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_UnhandledException);
             Executor executor;
-            appDomains.Add(myJob.Id, appDomain);
+            appDomains.Add(job.Id, appDomain);
             clientCom.LogMessage("Creating AppDomain");
             executor = (Executor)appDomain.CreateInstanceAndUnwrap(typeof(Executor).Assembly.GetName().Name, typeof(Executor).FullName);
             clientCom.LogMessage("Created AppDomain");
-            executor.JobId = myJob.Id;
             executor.Core = this;
-            clientCom.LogMessage("Starting Executor for job " + myJob.Id);
+            executor.JobId = job.Id;
+            executor.CoresNeeded = job.CoresNeeded;
+            executor.MemoryNeeded = job.MemoryNeeded;
+            clientCom.LogMessage("Starting Executor for job " + job.Id);
             executor.Start(jobData.Data);
-
             lock (executors) {
-              executors.Add(myJob.Id, executor);
+              executors.Add(job.Id, executor);
             }
           }
           catch (Exception exception) {
-            clientCom.LogMessage("Creating the Appdomain and loading the job failed for job " + myJob.Id);
+            clientCom.LogMessage("Creating the Appdomain and loading the job failed for job " + job.Id);
             clientCom.LogMessage("Error thrown is: " + exception.ToString());
 
-            if (executors.ContainsKey(myJob.Id) && executors[myJob.Id].CurrentException != string.Empty) {
-              wcfService.UpdateJobState(myJob.Id, JobState.Failed, executors[myJob.Id].CurrentException);
+            if (executors.ContainsKey(job.Id) && executors[job.Id].CurrentException != string.Empty) {
+              wcfService.UpdateJobState(job.Id, JobState.Failed, executors[job.Id].CurrentException);
             } else {
-              wcfService.UpdateJobState(myJob.Id, JobState.Failed, exception.ToString());
+              wcfService.UpdateJobState(job.Id, JobState.Failed, exception.ToString());
             }
             SlaveStatusInfo.JobsAborted++;
 
-            KillAppDomain(myJob.Id);
+            KillAppDomain(job.Id);
           }
         }
@@ -587,5 +571,4 @@
           }
 
-          jobs.Remove(id);
           PluginCache.Instance.DeletePluginsForJob(id);
           GC.Collect();
@@ -602,4 +585,10 @@
       return null; // avoid destruction of proxy object after 5 minutes
     }
+
+    public int GetCoresNeeded() {
+      lock (executors) {
+        return executors.Sum(x => x.Value.CoresNeeded);
+      }
+    }
   }
 }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs	(revision 6168)
@@ -34,4 +34,6 @@
     public Guid JobId { get; set; }
     public IJob Job { get; set; }
+    public int CoresNeeded { get; set; }
+    public int MemoryNeeded { get; set; }
     private bool wasJobAborted = false;
     public Core Core { get; set; }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.cs	(revision 6168)
@@ -124,4 +124,5 @@
         if (Content != null && Content.Job != null) {
           this.stateTextBox.Text = Content.Job.State.ToString();
+          this.commandTextBox.Text = Content.Job.Command.ToString();
           this.executionTimeTextBox.Text = Content.Job.ExecutionTime.ToString();
           this.dateFinishedTextBox.Text = Content.Job.DateFinished.ToString();
@@ -137,4 +138,5 @@
         } else {
           this.stateTextBox.Text = string.Empty;
+          this.commandTextBox.Text = string.Empty;
           this.executionTimeTextBox.Text = string.Empty;
           this.dateCalculatedText.Text = string.Empty;
@@ -152,4 +154,5 @@
       this.jobIdTextBox.ReadOnly = true;
       this.stateTextBox.ReadOnly = true;
+      this.commandTextBox.ReadOnly = true;
       this.executionTimeTextBox.ReadOnly = true;
       this.dateCreatedTextBox.ReadOnly = true;
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.designer.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.designer.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.designer.cs	(revision 6168)
@@ -58,4 +58,6 @@
       this.jobIdTextBox = new System.Windows.Forms.TextBox();
       this.tabControl = new System.Windows.Forms.TabControl();
+      this.commandTextBox = new System.Windows.Forms.TextBox();
+      this.commandLabel = new System.Windows.Forms.Label();
       this.stateLogTabPage.SuspendLayout();
       this.detailsTabPage.SuspendLayout();
@@ -122,5 +124,5 @@
       // 
       this.splitContainer1.Panel2.Controls.Add(this.jobStatusGroupBox);
-      this.splitContainer1.Size = new System.Drawing.Size(551, 155);
+      this.splitContainer1.Size = new System.Drawing.Size(551, 178);
       this.splitContainer1.SplitterDistance = 275;
       this.splitContainer1.TabIndex = 33;
@@ -139,5 +141,5 @@
       this.configurationGroupBox.Location = new System.Drawing.Point(0, 0);
       this.configurationGroupBox.Name = "configurationGroupBox";
-      this.configurationGroupBox.Size = new System.Drawing.Size(275, 155);
+      this.configurationGroupBox.Size = new System.Drawing.Size(275, 178);
       this.configurationGroupBox.TabIndex = 27;
       this.configurationGroupBox.TabStop = false;
@@ -219,4 +221,6 @@
       // jobStatusGroupBox
       // 
+      this.jobStatusGroupBox.Controls.Add(this.commandTextBox);
+      this.jobStatusGroupBox.Controls.Add(this.commandLabel);
       this.jobStatusGroupBox.Controls.Add(this.stateTextBox);
       this.jobStatusGroupBox.Controls.Add(this.dateCalculatedLabel);
@@ -234,5 +238,5 @@
       this.jobStatusGroupBox.Location = new System.Drawing.Point(0, 0);
       this.jobStatusGroupBox.Name = "jobStatusGroupBox";
-      this.jobStatusGroupBox.Size = new System.Drawing.Size(272, 155);
+      this.jobStatusGroupBox.Size = new System.Drawing.Size(272, 178);
       this.jobStatusGroupBox.TabIndex = 24;
       this.jobStatusGroupBox.TabStop = false;
@@ -251,5 +255,5 @@
       // 
       this.dateCalculatedLabel.AutoSize = true;
-      this.dateCalculatedLabel.Location = new System.Drawing.Point(7, 85);
+      this.dateCalculatedLabel.Location = new System.Drawing.Point(7, 108);
       this.dateCalculatedLabel.Name = "dateCalculatedLabel";
       this.dateCalculatedLabel.Size = new System.Drawing.Size(83, 13);
@@ -270,5 +274,5 @@
       this.dateCalculatedText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                   | System.Windows.Forms.AnchorStyles.Right)));
-      this.dateCalculatedText.Location = new System.Drawing.Point(95, 85);
+      this.dateCalculatedText.Location = new System.Drawing.Point(95, 108);
       this.dateCalculatedText.Name = "dateCalculatedText";
       this.dateCalculatedText.Size = new System.Drawing.Size(171, 20);
@@ -279,5 +283,5 @@
       this.dateFinishedTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                   | System.Windows.Forms.AnchorStyles.Right)));
-      this.dateFinishedTextBox.Location = new System.Drawing.Point(95, 107);
+      this.dateFinishedTextBox.Location = new System.Drawing.Point(95, 130);
       this.dateFinishedTextBox.Name = "dateFinishedTextBox";
       this.dateFinishedTextBox.Size = new System.Drawing.Size(171, 20);
@@ -288,5 +292,5 @@
       this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                   | System.Windows.Forms.AnchorStyles.Right)));
-      this.executionTimeTextBox.Location = new System.Drawing.Point(95, 41);
+      this.executionTimeTextBox.Location = new System.Drawing.Point(95, 64);
       this.executionTimeTextBox.Name = "executionTimeTextBox";
       this.executionTimeTextBox.Size = new System.Drawing.Size(171, 20);
@@ -297,5 +301,5 @@
       this.dateCreatedTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                   | System.Windows.Forms.AnchorStyles.Right)));
-      this.dateCreatedTextBox.Location = new System.Drawing.Point(95, 63);
+      this.dateCreatedTextBox.Location = new System.Drawing.Point(95, 86);
       this.dateCreatedTextBox.Name = "dateCreatedTextBox";
       this.dateCreatedTextBox.Size = new System.Drawing.Size(171, 20);
@@ -305,5 +309,5 @@
       // 
       this.executionTimeLabel.AutoSize = true;
-      this.executionTimeLabel.Location = new System.Drawing.Point(7, 41);
+      this.executionTimeLabel.Location = new System.Drawing.Point(7, 64);
       this.executionTimeLabel.Name = "executionTimeLabel";
       this.executionTimeLabel.Size = new System.Drawing.Size(80, 13);
@@ -314,5 +318,5 @@
       // 
       this.exceptionLabel.AutoSize = true;
-      this.exceptionLabel.Location = new System.Drawing.Point(7, 129);
+      this.exceptionLabel.Location = new System.Drawing.Point(7, 152);
       this.exceptionLabel.Name = "exceptionLabel";
       this.exceptionLabel.Size = new System.Drawing.Size(57, 13);
@@ -323,5 +327,5 @@
       // 
       this.dateCreatedLabel.AutoSize = true;
-      this.dateCreatedLabel.Location = new System.Drawing.Point(7, 63);
+      this.dateCreatedLabel.Location = new System.Drawing.Point(7, 86);
       this.dateCreatedLabel.Name = "dateCreatedLabel";
       this.dateCreatedLabel.Size = new System.Drawing.Size(70, 13);
@@ -332,5 +336,5 @@
       // 
       this.dateFinishedLabel.AutoSize = true;
-      this.dateFinishedLabel.Location = new System.Drawing.Point(7, 107);
+      this.dateFinishedLabel.Location = new System.Drawing.Point(7, 130);
       this.dateFinishedLabel.Name = "dateFinishedLabel";
       this.dateFinishedLabel.Size = new System.Drawing.Size(72, 13);
@@ -342,5 +346,5 @@
       this.exceptionTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                   | System.Windows.Forms.AnchorStyles.Right)));
-      this.exceptionTextBox.Location = new System.Drawing.Point(95, 129);
+      this.exceptionTextBox.Location = new System.Drawing.Point(95, 152);
       this.exceptionTextBox.Name = "exceptionTextBox";
       this.exceptionTextBox.Size = new System.Drawing.Size(171, 20);
@@ -435,4 +439,22 @@
       this.tabControl.Size = new System.Drawing.Size(571, 401);
       this.tabControl.TabIndex = 25;
+      // 
+      // commandTextBox
+      // 
+      this.commandTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.commandTextBox.Location = new System.Drawing.Point(95, 41);
+      this.commandTextBox.Name = "commandTextBox";
+      this.commandTextBox.Size = new System.Drawing.Size(171, 20);
+      this.commandTextBox.TabIndex = 24;
+      // 
+      // commandLabel
+      // 
+      this.commandLabel.AutoSize = true;
+      this.commandLabel.Location = new System.Drawing.Point(7, 41);
+      this.commandLabel.Name = "commandLabel";
+      this.commandLabel.Size = new System.Drawing.Size(57, 13);
+      this.commandLabel.TabIndex = 25;
+      this.commandLabel.Text = "Command:";
       // 
       // HiveJobView
@@ -497,4 +519,6 @@
     protected System.Windows.Forms.Label dateCreatedLabel;
     protected System.Windows.Forms.SplitContainer splitContainer1;
+    protected System.Windows.Forms.TextBox commandTextBox;
+    protected System.Windows.Forms.Label commandLabel;
 
   }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/OptimizerHiveJobView.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/OptimizerHiveJobView.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/OptimizerHiveJobView.cs	(revision 6168)
@@ -54,7 +54,7 @@
       base.SetEnabledStateOfControls();
 
-      this.restartButton.Enabled = Content != null && Content.Job.State == JobState.Paused;
-      this.pauseButton.Enabled = Content != null && Content.Job.State == JobState.Calculating;
-      this.stopButton.Enabled = Content != null && (Content.Job.State == JobState.Calculating || Content.Job.State == JobState.Waiting || Content.Job.State == JobState.Paused);
+      this.restartButton.Enabled = Content != null && !Content.Job.Command.HasValue && Content.Job.State == JobState.Paused;
+      this.pauseButton.Enabled = Content != null && !Content.Job.Command.HasValue && Content.Job.State == JobState.Calculating;
+      this.stopButton.Enabled = Content != null && !Content.Job.Command.HasValue && (Content.Job.State == JobState.Calculating || Content.Job.State == JobState.Waiting || Content.Job.State == JobState.Paused);
     }
     #endregion
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartListView.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartListView.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartListView.cs	(revision 6168)
@@ -64,5 +64,10 @@
         if (Content.Count > 0) {
           DateTime maxValue = Content.Max(x => x.Count > 0 ? x.Max(y => y.DateTime) : DateTime.MinValue);
-          var upperLimit = DateTime.FromOADate(Math.Min(DateTime.Now.AddSeconds(10).ToOADate(), maxValue.AddSeconds(10).ToOADate()));
+          DateTime upperLimit;
+          if (Content.All(x => x.Count > 0 ? (x.Last().State == JobState.Finished || x.Last().State == JobState.Failed || x.Last().State == JobState.Aborted) : true)) {
+            upperLimit = DateTime.FromOADate(Math.Min(DateTime.Now.AddSeconds(10).ToOADate(), maxValue.AddSeconds(10).ToOADate()));
+          } else {
+            upperLimit = DateTime.Now;
+          }
 
           for (int i = 0; i < Content.Count; i++) {
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartView.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartView.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartView.cs	(revision 6168)
@@ -62,5 +62,10 @@
         StateLogGanttChartListView.SetupCategories(ganttChart);
         if (Content.Count > 0) {
-          var upperLimit = DateTime.FromOADate(Math.Min(Content.Max(x => x.DateTime).ToOADate(), DateTime.Now.AddSeconds(10).ToOADate()));
+          DateTime upperLimit;
+          if(Content.Last().State == JobState.Finished || Content.Last().State == JobState.Failed || Content.Last().State == JobState.Aborted) {
+            upperLimit = DateTime.FromOADate(Math.Min(Content.Max(x => x.DateTime).ToOADate(), DateTime.Now.AddSeconds(10).ToOADate()));
+          } else {
+            upperLimit = DateTime.Now;
+          }
 
           for (int i = 0; i < Content.Count - 1; i++) {
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJob.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJob.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJob.cs	(revision 6168)
@@ -320,9 +320,21 @@
 
     public void Pause() {
-      ServiceLocator.Instance.CallHiveService(s => s.PauseJob(this.job.Id));
+      if (this.Job.IsParentJob) {
+        foreach (var child in ChildHiveJobs) {
+          ServiceLocator.Instance.CallHiveService(s => s.PauseJob(child.job.Id));
+        }
+      } else {
+        ServiceLocator.Instance.CallHiveService(s => s.PauseJob(this.job.Id));
+      }      
     }
 
     public void Stop() {
-      ServiceLocator.Instance.CallHiveService(s => s.StopJob(this.job.Id));
+      if (this.Job.IsParentJob) {
+        foreach (var child in ChildHiveJobs) {
+          ServiceLocator.Instance.CallHiveService(s => s.StopJob(child.job.Id));
+        }
+      } else {
+        ServiceLocator.Instance.CallHiveService(s => s.StopJob(this.job.Id));
+      }
     }
 
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJobDownloader.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJobDownloader.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJobDownloader.cs	(revision 6168)
@@ -1,7 +1,26 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
 using HeuristicLab.Clients.Hive.ExperimentManager;
 using HeuristicLab.Clients.Hive.Jobs;
@@ -11,12 +30,13 @@
   public class HiveJobDownloader {
     private IEnumerable<Guid> jobIds;
-    private List<Task<HiveJob>> tasks;
-    private bool abort = false;
+    private JobDownloader<ItemJob> jobDownloader;
+    private IDictionary<Guid, HiveJob> results;
 
     public bool IsFinished {
       get {
-        return tasks.TrueForAll(t => t.Status == TaskStatus.RanToCompletion ||
-                                     t.Status == TaskStatus.Faulted ||
-                                     t.Status == TaskStatus.Canceled);
+        //return tasks.TrueForAll(t => t.Status == TaskStatus.RanToCompletion ||
+        //                             t.Status == TaskStatus.Faulted ||
+        //                             t.Status == TaskStatus.Canceled);
+        return results.Count == jobIds.Count();
       }
     }
@@ -24,12 +44,13 @@
     public int FinishedCount {
       get {
-        var faulted = tasks.Where(t => t.Status == TaskStatus.Faulted);
-        if (faulted.Count() > 0) {
-          abort = true;
-          throw faulted.First().Exception;
-        }
-        return tasks.Count(t => t.Status == TaskStatus.RanToCompletion ||
-                                t.Status == TaskStatus.Faulted ||
-                                t.Status == TaskStatus.Canceled);
+        //var faulted = tasks.Where(t => t.Status == TaskStatus.Faulted);
+        //if (faulted.Count() > 0) {
+        //  abort = true;
+        //  throw faulted.First().Exception;
+        //}
+        //return tasks.Count(t => t.Status == TaskStatus.RanToCompletion ||
+        //                        t.Status == TaskStatus.Faulted ||
+        //                        t.Status == TaskStatus.Canceled);
+        return results.Count;
       }
     }
@@ -37,12 +58,12 @@
     public IDictionary<Guid, HiveJob> Results {
       get {
-        var results = new Dictionary<Guid, HiveJob>();
-        foreach (var t in tasks) {
-          if (t.Status == TaskStatus.Faulted) {
-            throw t.Exception;
-          }
-          if (t.Result != null)
-            results.Add(t.Result.Job.Id, t.Result);
-        }
+        //var results = new Dictionary<Guid, HiveJob>();
+        //foreach (var t in tasks) {
+        //  if (t.Status == TaskStatus.Faulted) {
+        //    throw t.Exception;
+        //  }
+        //  if (t.Result != null)
+        //    results.Add(t.Result.Job.Id, t.Result);
+        //}
         return results;
       }
@@ -51,58 +72,79 @@
     public HiveJobDownloader(IEnumerable<Guid> jobIds) {
       this.jobIds = jobIds;
+      this.jobDownloader = new JobDownloader<ItemJob>(2, 2);
+      this.results = new Dictionary<Guid, HiveJob>();
     }
 
     public void StartAsync() {
-      abort = false;
-      tasks = new List<Task<HiveJob>>();
-      TaskScheduler.UnobservedTaskException += new EventHandler<UnobservedTaskExceptionEventArgs>(TaskScheduler_UnobservedTaskException);
       foreach (Guid jobId in jobIds) {
-        tasks.Add(Task<JobData>.Factory.StartNew(
-          (x) => DownloadJob(x), jobId)
-          .ContinueWith((x) => DeserializeJob(x.Result)));
+        jobDownloader.DownloadJob(jobId,
+          (id, itemJob, exception) => {
+            if (exception != null) {
+              throw new JobDownloaderException("Downloading job failed", exception);
+            }
+            Job job = ServiceLocator.Instance.CallHiveService(s => s.GetJob(id));
+            if (job != null && itemJob != null) {
+              HiveJob hiveJob;
+              if (itemJob is OptimizerJob) {
+                hiveJob = new OptimizerHiveJob((OptimizerJob)itemJob);
+              } else {
+                hiveJob = new HiveJob(itemJob, true);
+              }
+              hiveJob.Job = job;
+              this.results.Add(id, hiveJob);
+            }
+          });
       }
+
+      //tasks = new List<Task<HiveJob>>();
+      //TaskScheduler.UnobservedTaskException += new EventHandler<UnobservedTaskExceptionEventArgs>(TaskScheduler_UnobservedTaskException);
+      //foreach (Guid jobId in jobIds) {
+      //  tasks.Add(Task<JobData>.Factory.StartNew(
+      //    (x) => DownloadJob(x), jobId)
+      //    .ContinueWith((x) => DeserializeJob(x.Result)));
+      //}
     }
 
-    private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) {
-      e.SetObserved(); // avoid crash of process because task crashes. first exception found is handled in Results property
-    }
+    //private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) {
+    //  e.SetObserved(); // avoid crash of process because task crashes. first exception found is handled in Results property
+    //}
 
-    // use semaphore to ensure only few concurrenct connections and few SerializedJob objects in memory
-    private Semaphore downloadSemaphore = new Semaphore(2, 2);
-    private Semaphore deserializeSemaphore = new Semaphore(2, 2);
-    protected JobData DownloadJob(object jobId) {
-      downloadSemaphore.WaitOne();
-      deserializeSemaphore.WaitOne();
-      JobData result;
-      try {
-        if (abort) return null;
-        result = ServiceLocator.Instance.CallHiveService(s => s.GetJobData((Guid)jobId));
-      }
-      finally {
-        downloadSemaphore.Release();
-      }
-      return result;
-    }
+    //// use semaphore to ensure only few concurrenct connections and few SerializedJob objects in memory
+    //private Semaphore downloadSemaphore = new Semaphore(2, 2);
+    //private Semaphore deserializeSemaphore = new Semaphore(2, 2);
+    //protected JobData DownloadJob(object jobId) {
+    //  downloadSemaphore.WaitOne();
+    //  deserializeSemaphore.WaitOne();
+    //  JobData result;
+    //  try {
+    //    if (abort) return null;
+    //    result = ServiceLocator.Instance.CallHiveService(s => s.GetJobData((Guid)jobId));
+    //  }
+    //  finally {
+    //    downloadSemaphore.Release();
+    //  }
+    //  return result;
+    //}
 
-    protected HiveJob DeserializeJob(JobData jobData) {
-      try {
-        Job job = ServiceLocator.Instance.CallHiveService(s => s.GetJob(jobData.JobId));
-        if (abort || job == null || jobData == null) return null;
+    //protected HiveJob DeserializeJob(JobData jobData) {
+    //  try {
+    //    Job job = ServiceLocator.Instance.CallHiveService(s => s.GetJob(jobData.JobId));
+    //    if (abort || job == null || jobData == null) return null;
 
-        HiveJob hiveJob;
-        var itemJob = PersistenceUtil.Deserialize<ItemJob>(jobData.Data);
-        if (itemJob is OptimizerJob) {
-          hiveJob = new OptimizerHiveJob((OptimizerJob)itemJob);
-        } else {
-          hiveJob = new HiveJob(itemJob, true);
-        }
-        jobData.Data = null; // reduce memory consumption.
-        hiveJob.Job = job;
-        return hiveJob;
-      }
-      finally {
-        deserializeSemaphore.Release();
-      }
-    }
+    //    HiveJob hiveJob;
+    //    var itemJob = PersistenceUtil.Deserialize<ItemJob>(jobData.Data);
+    //    if (itemJob is OptimizerJob) {
+    //      hiveJob = new OptimizerHiveJob((OptimizerJob)itemJob);
+    //    } else {
+    //      hiveJob = new HiveJob(itemJob, true);
+    //    }
+    //    jobData.Data = null; // reduce memory consumption.
+    //    hiveJob.Job = job;
+    //    return hiveJob;
+    //  }
+    //  finally {
+    //    deserializeSemaphore.Release();
+    //  }
+    //}
   }
 }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/JobDownloader.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/JobDownloader.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/JobDownloader.cs	(revision 6168)
@@ -20,13 +20,12 @@
     }
 
-    public void DownloadJob(Guid jobId, Action<T> onFinishedAction) {
+    public void DownloadJob(Guid jobId, Action<Guid, T, Exception> onFinishedAction) {
       Task<JobData>.Factory.StartNew((x) => DownloadJob(x), jobId)
                                      .ContinueWith((x) => DeserializeJob(x.Result))
-                                     .ContinueWith((x) => OnJobFinished(x.Result, onFinishedAction), TaskContinuationOptions.ExecuteSynchronously);
+                                     .ContinueWith((x) => OnJobFinished(jobId, x, onFinishedAction), TaskContinuationOptions.ExecuteSynchronously);
     }
 
-    private T OnJobFinished(T job, Action<T> onFinishedAction) {
-      onFinishedAction(job);
-      return job;
+    private void OnJobFinished(Guid jobId, Task<T> task, Action<Guid, T, Exception> onFinishedAction) {
+      onFinishedAction(jobId, task.Result, task.Exception);
     }
 
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/JobDownloaderException.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/JobDownloaderException.cs	(revision 6168)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/JobDownloaderException.cs	(revision 6168)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+
+namespace HeuristicLab.Clients.Hive {
+  public class JobDownloaderException : Exception {
+    public JobDownloaderException(string message, Exception innerException)
+      : base(message, innerException) { }
+  }
+}
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/RefreshableHiveExperiment.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/RefreshableHiveExperiment.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/RefreshableHiveExperiment.cs	(revision 6168)
@@ -35,4 +35,5 @@
     private JobResultPoller jobResultPoller;
     private JobDownloader<ItemJob> jobDownloader = new JobDownloader<ItemJob>(2, 2);
+    private static object locker = new object();
 
     [Storable]
@@ -66,12 +67,16 @@
       get { return refreshAutomatically; }
       set {
-        if (refreshAutomatically != value) {
-          refreshAutomatically = value;
-          OnRefreshAutomaticallyChanged();
-        }
-        if (RefreshAutomatically && hiveExperiment.HiveJobs != null && hiveExperiment.HiveJobs.Count > 0 && (jobResultPoller == null || !jobResultPoller.IsPolling)) {
-          StartResultPolling();
-        } else {
-          StopResultPolling();
+        lock (locker) {
+          if (refreshAutomatically != value) {
+            refreshAutomatically = value;
+            OnRefreshAutomaticallyChanged();
+          }
+          if (RefreshAutomatically) {
+            if (hiveExperiment.HiveJobs != null && hiveExperiment.HiveJobs.Count > 0 && (jobResultPoller == null || !jobResultPoller.IsPolling)) {
+              StartResultPolling();
+            }
+          } else {
+            StopResultPolling();
+          }
         }
       }
@@ -156,5 +161,9 @@
           // lastJobDataUpdate equals DateTime.MinValue right after it was uploaded. When the first results are polled, this value is updated
           if (lastJobDataUpdate != DateTime.MinValue && lastJobDataUpdate < hj.Job.LastJobDataUpdate) {
-            jobDownloader.DownloadJob(hj.Job.Id, (itemJob) => {
+            jobDownloader.DownloadJob(hj.Job.Id, (id, itemJob, exception) => {
+              if (exception != null) {
+                throw new JobDownloaderException("Downloading job failed.", exception);
+              }
+
               if (itemJob == null) {
                 // something bad happened to this job. bad job, BAAAD job!
@@ -218,12 +227,4 @@
       hiveExperiment.ExecutionTime = TimeSpan.FromMilliseconds(hiveExperiment.GetAllHiveJobs().Sum(x => x.Job.ExecutionTime.HasValue ? x.Job.ExecutionTime.Value.TotalMilliseconds : 0));
     }
-
-    public void OnLoaded() {
-      this.UpdateTotalExecutionTime();
-
-      if (hiveExperiment.ExecutionState != ExecutionState.Stopped) {
-        this.RefreshAutomatically = true;
-      }
-    }
     #endregion
 
@@ -235,4 +236,5 @@
       hiveExperiment.ModifiedChanged += new EventHandler(hiveExperiment_ModifiedChanged);
       hiveExperiment.IsProgressingChanged += new EventHandler(hiveExperiment_IsProgressingChanged);
+      hiveExperiment.Loaded += new EventHandler(hiveExperiment_Loaded);
     }
 
@@ -244,4 +246,13 @@
       hiveExperiment.ModifiedChanged -= new EventHandler(hiveExperiment_ModifiedChanged);
       hiveExperiment.IsProgressingChanged -= new EventHandler(hiveExperiment_IsProgressingChanged);
+      hiveExperiment.Loaded -= new EventHandler(hiveExperiment_Loaded);
+    }
+
+    private void hiveExperiment_Loaded(object sender, EventArgs e) {
+      this.UpdateTotalExecutionTime();
+
+      if (hiveExperiment.ExecutionState != ExecutionState.Stopped) {
+        this.RefreshAutomatically = true;
+      }
     }
 
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj	(revision 6168)
@@ -123,4 +123,5 @@
     <Compile Include="ExperimentManager\ExperimentManagerClient.cs" />
     <Compile Include="ExperimentManager\HiveJobDownloader.cs" />
+    <Compile Include="ExperimentManager\JobDownloaderException.cs" />
     <Compile Include="ExperimentManager\TreeView\IItemTree.cs" />
     <Compile Include="ExperimentManager\TreeView\IItemTreeAction.cs" />
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveExperiment.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveExperiment.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveExperiment.cs	(revision 6168)
@@ -119,12 +119,12 @@
     #region Events
     public event EventHandler ExecutionTimeChanged;
-    private void OnExecutionTimeChanged() {
-      EventHandler handler = ExecutionTimeChanged;
+    protected virtual void OnExecutionTimeChanged() {
+      var handler = ExecutionTimeChanged;
       if (handler != null) handler(this, EventArgs.Empty);
     }
 
     public event EventHandler ExecutionStateChanged;
-    private void OnExecutionStateChanged() {
-      EventHandler handler = ExecutionStateChanged;
+    protected virtual void OnExecutionStateChanged() {
+      var handler = ExecutionStateChanged;
       if (handler != null) handler(this, EventArgs.Empty);
     }
@@ -132,11 +132,17 @@
     public event EventHandler HiveJobsChanged;
     protected virtual void OnHiveJobsChanged() {
-      EventHandler handler = HiveJobsChanged;
+      var handler = HiveJobsChanged;
       if (handler != null) handler(this, EventArgs.Empty);
     }
 
     public event EventHandler IsProgressingChanged;
-    private void OnIsProgressingChanged() {
-      EventHandler handler = IsProgressingChanged;
+    protected virtual void OnIsProgressingChanged() {
+      var handler = IsProgressingChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    public event EventHandler Loaded;
+    public virtual void OnLoaded() {
+      var handler = Loaded;
       if (handler != null) handler(this, EventArgs.Empty);
     }
@@ -175,6 +181,4 @@
       return Name;
     }
-
-    public virtual void OnLoaded() { }
   }
 }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_ascheibe.config
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_ascheibe.config	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_ascheibe.config	(revision 6168)
@@ -1,21 +1,39 @@
 <?xml version="1.0"?>
 <configuration>
-    <system.serviceModel>
-        <bindings>
-          <wsHttpBinding>
-            <binding name="wsHttpBinding_Hive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
-              <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647"/>
-              <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
-              <security mode="Message">
-                <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
-                <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default"/>
-              </security>
-            </binding>
-          </wsHttpBinding>
-            </bindings>
-      <client>
+  <system.serviceModel>
+    <bindings>
+      <wsHttpBinding>
+        <binding name="wsHttpBinding_IHiveService"
+                 closeTimeout="00:01:00"
+                 openTimeout="00:01:00"
+                 receiveTimeout="00:20:00"
+                 sendTimeout="00:20:00"
+                 bypassProxyOnLocal="false"
+                 transactionFlow="false"
+                 hostNameComparisonMode="StrongWildcard"
+                 maxBufferPoolSize="2147483647"
+                 maxReceivedMessageSize="2147483647"
+                 messageEncoding="Text"
+                 textEncoding="utf-8"
+                 useDefaultWebProxy="true"
+                 allowCookies="false">
+
+          <readerQuotas maxDepth="2147483647"
+                        maxStringContentLength="2147483647"
+                        maxArrayLength="2147483647"
+                        maxBytesPerRead="2147483647"
+                        maxNameTableCharCount="2147483647"/>
+          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
+          <security mode="Message">
+            <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
+            <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default"/>
+          </security>
+        </binding>
+      </wsHttpBinding>
+    </bindings>
+    <client>
       <endpoint address="http://localhost/HiveService.svc"
             binding="wsHttpBinding"
-            bindingConfiguration="wsHttpBinding_Hive"
+            bindingConfiguration="wsHttpBinding_IHiveService"
             contract="HeuristicLab.Clients.Hive.IHiveService"
             name="wsHttpBinding_IHiveService">
@@ -25,5 +43,8 @@
 
       </endpoint>
-      </client>
-    </system.serviceModel>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
+    </client>
+  </system.serviceModel>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
+  </startup>
+</configuration>
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_f005pc.config
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_f005pc.config	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_f005pc.config	(revision 6168)
@@ -1,24 +1,45 @@
 <?xml version="1.0"?>
 <configuration>
-    <system.serviceModel>
-        <bindings>
-            <wsHttpBinding>
-                <binding name="wsHttpBinding_Hive" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
-                  <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
-                  <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
-                  <security mode="Message">
-                    <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
-                    <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default"/>
-                  </security>
-                </binding>
-              </wsHttpBinding>
-            </bindings>
-        <client>
-            <endpoint address="http://localhost/Hive-3.4/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService">
-              <identity>
-                <certificate encodedValue="AwAAAAEAAAAUAAAAfEKvcVixnJay+q4hCPFuO0JL5TQgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMTAxOTEwNTMxNVoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXwC5TGcAffd/0oAWHtm0s6YXVXEgXgb1AYmBkkkhkKIFJG/e/Z0KSYbJepmSJD44W3oOAVm+x1DAsZxU79HahDYgWCuHLMm1TLpwSmYOQ0kV3pGHWHhiWV7h7oGLds/eqZ2EOpaNGryfEPnrA4VmxY91vV5/2BTeVSWG6F8lRKQIDAQABo0kwRzBFBgNVHQEEPjA8gBAR7kBnMRHO5gzThEqda0wWoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQADgYEAoPwEG4QTDXhlxERNDfsZmM2IhEpV42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac="/>
-              </identity>
-            </endpoint>
-        </client>
-    </system.serviceModel>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
+  <system.serviceModel>
+    <bindings>
+      <wsHttpBinding>
+        <binding name="wsHttpBinding_IHiveService"
+                 closeTimeout="00:01:00"
+                 openTimeout="00:01:00"
+                 receiveTimeout="00:20:00"
+                 sendTimeout="00:20:00"
+                 bypassProxyOnLocal="false"
+                 transactionFlow="false"
+                 hostNameComparisonMode="StrongWildcard"
+                 maxBufferPoolSize="2147483647"
+                 maxReceivedMessageSize="2147483647"
+                 messageEncoding="Text"
+                 textEncoding="utf-8"
+                 useDefaultWebProxy="true"
+                 allowCookies="false">
+
+          <readerQuotas maxDepth="2147483647"
+                        maxStringContentLength="2147483647"
+                        maxArrayLength="2147483647"
+                        maxBytesPerRead="2147483647"
+                        maxNameTableCharCount="2147483647"/>
+          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
+          <security mode="Message">
+            <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/>
+            <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default"/>
+          </security>
+        </binding>
+      </wsHttpBinding>
+    </bindings>
+    <client>
+      <endpoint address="http://localhost/Hive-3.4/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService">
+        <identity>
+          <certificate encodedValue="AwAAAAEAAAAUAAAAfEKvcVixnJay+q4hCPFuO0JL5TQgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMTAxOTEwNTMxNVoXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXwC5TGcAffd/0oAWHtm0s6YXVXEgXgb1AYmBkkkhkKIFJG/e/Z0KSYbJepmSJD44W3oOAVm+x1DAsZxU79HahDYgWCuHLMm1TLpwSmYOQ0kV3pGHWHhiWV7h7oGLds/eqZ2EOpaNGryfEPnrA4VmxY91vV5/2BTeVSWG6F8lRKQIDAQABo0kwRzBFBgNVHQEEPjA8gBAR7kBnMRHO5gzThEqda0wWoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghCNN5wrUcXMmE/9xwp4TYa9MAkGBSsOAwIdBQADgYEAoPwEG4QTDXhlxERNDfsZmM2IhEpV42ppz1kEah2oYKDa/ElIMVtvqLv6flVtg18ENN/mEJWiHZ3NyP3qr2Pip+sh+/2WBiSbOaukES/CM7OJn9kJCImH7M/xqM8pxqY8IfgM6iBVrVj9uHqj3j2BBck+cYY8fKyh3CFifMIp6ac="/>
+        </identity>
+      </endpoint>
+    </client>
+  </system.serviceModel>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
+  </startup>
+</configuration>
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_services.config
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_services.config	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/app_services.config	(revision 6168)
@@ -4,5 +4,5 @@
     <bindings>
       <wsHttpBinding>
-        <binding name="wsHttpBinding_Hive"
+        <binding name="wsHttpBinding_IHiveService"
                  closeTimeout="00:01:00"
                  openTimeout="00:01:00"
@@ -33,5 +33,5 @@
     </bindings>
     <client>
-      <endpoint address="http://services.heuristiclab.com/Hive-3.4/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_Hive" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService">
+      <endpoint address="http://services.heuristiclab.com/Hive-3.4/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IHiveService" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService">
         <identity>
           <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Web/Hive-3.4/Web.config
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Web/Hive-3.4/Web.config	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Web/Hive-3.4/Web.config	(revision 6168)
@@ -30,7 +30,11 @@
     <bindings>
       <wsHttpBinding>
-        <binding name="WSHttpBinding_IHiveService" receiveTimeout="00:20:00"
-          sendTimeout="00:20:00" maxBufferPoolSize="104857600" maxReceivedMessageSize="104857600">
-          <readerQuotas maxStringContentLength="104857600" maxArrayLength="104857600" />
+
+        <binding name="WSHttpBinding_IHiveService"
+		             receiveTimeout="00:10:00"
+                 sendTimeout="00:10:00"
+		             maxBufferPoolSize="2147483647"
+		             maxReceivedMessageSize="2147483647">
+          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" />
           <security mode="Message">
             <transport clientCredentialType="Certificate"/>
@@ -55,4 +59,5 @@
           <serviceSecurityAudit auditLogLocation="Application" suppressAuditFailure="false" messageAuthenticationAuditLevel="SuccessOrFailure" />
           <serviceThrottling maxConcurrentCalls="100" />
+          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
         </behavior>
       </serviceBehaviors>
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs	(revision 6167)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs	(revision 6168)
@@ -171,8 +171,13 @@
     public void StopJob(Guid jobId) {
       trans.UseTransaction(() => {
-        //dao.UpdateJobState(jobId, JobState.Aborted, null, auth.UserId, string.Empty);
         var job = dao.GetJob(jobId);
-        job.Command = Command.Stop;
-        dao.UpdateJob(job);
+        if (job.State == JobState.Calculating || job.State == JobState.Transferring) {
+          job.Command = Command.Stop;
+          dao.UpdateJob(job);
+        } else {
+          if (job.State != JobState.Aborted && job.State != JobState.Finished && job.State != JobState.Failed) {
+            job = UpdateJobState(jobId, JobState.Aborted, null, null, string.Empty);
+          }
+        }
       });
     }
@@ -183,8 +188,11 @@
     public void PauseJob(Guid jobId) {
       trans.UseTransaction(() => {
-        //dao.UpdateJobState(jobId, JobState.Paused, null, auth.UserId, string.Empty);
         var job = dao.GetJob(jobId);
-        job.Command = Command.Pause;
-        dao.UpdateJob(job);
+        if (job.State == JobState.Calculating || job.State == JobState.Transferring) {
+          job.Command = Command.Pause;
+          dao.UpdateJob(job);
+        } else {
+          job = UpdateJobState(jobId, JobState.Paused, null, null, string.Empty);
+        }
       });
     }
