Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/Core.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/Core.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/Core.cs	(revision 4141)
@@ -46,4 +46,5 @@
 using HeuristicLab.Tracing;
 using HeuristicLab.Core;
+using System.IO;
 
 namespace HeuristicLab.Hive.Client.Core {
@@ -134,17 +135,6 @@
 
         case MessageContainer.MessageType.JobAborted:
-          //todo: thread this          
-          lock (engines) {
-            Guid jobId = new Guid(container.JobId.ToString());
-            if (engines.ContainsKey(jobId)) {
-              appDomains[jobId].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException);
-              AppDomain.Unload(appDomains[jobId]);
-              appDomains.Remove(jobId);
-              engines.Remove(jobId);
-              jobs.Remove(jobId);
-              GC.Collect();
-            } else
-              Logger.Error("JobAbort: Engine doesn't exist");
-          }
+          Guid jobId = new Guid(container.JobId.ToString());
+          KillAppDomain(jobId);
           break;
 
@@ -247,21 +237,9 @@
         if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin) {
           Logger.Info("Sending the finished job with id: " + jId);
-          wcfService.StoreFinishedJobResultAsync(ConfigManager.Instance.GetClientInfo().Id, jId, sJob, 1.0, null, true);
+          wcfService.StoreFinishedJobResultAsync(ConfigManager.Instance.GetClientInfo().Id, jId, sJob, 1.0, engines[jId].CurrentException, true);
         } else {
           Logger.Info("Storing the finished job with id: " + jId + " to hdd");
           JobStorageManager.PersistObjectToDisc(wcfService.ServerIP, wcfService.ServerPort, jId, sJob);
-          lock (engines) {
-            appDomains[jId].UnhandledException -= new UnhandledExceptionEventHandler(appDomain_UnhandledException);
-
-            //Disposing it
-            engines[jId].Dispose();
-
-            AppDomain.Unload(appDomains[jId]);
-            Logger.Debug("Unloaded appdomain");
-            appDomains.Remove(jId);
-            engines.Remove(jId);
-            jobs.Remove(jId);
-            Logger.Debug("Removed job from appDomains, Engines and Jobs");
-          }
+          KillAppDomain(jId);
         }
       } catch (InvalidStateException ise) {
@@ -332,11 +310,13 @@
         PluginCache.Instance.PreparePlugins(e.Result.Job.PluginsNeeded);
 
+        PluginCache.Instance.CopyPluginsForJob(e.Result.Job.PluginsNeeded, e.Result.Job.Id);
+
         //        foreach (CachedHivePluginInfoDto plugininfo in PluginCache.Instance.GetPlugins(e.Result.Job.PluginsNeeded))
         //        files.AddRange(plugininfo.PluginFiles);
         Logger.Debug("Plugins fetched for job " + e.Result.Job.Id);
         try {
-          AppDomain appDomain =
-            HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(
-              e.Result.Job.Id.ToString(), null);
+          String pluginDir = Path.Combine(PluginCache.PLUGIN_REPO, e.Result.Job.Id.ToString());
+          
+          AppDomain appDomain = HeuristicLab.PluginInfrastructure.Sandboxing.SandboxManager.CreateAndInitSandbox(pluginDir, null);
           appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
           lock (engines) {
@@ -365,4 +345,5 @@
           CurrentlyFetching = false;
           KillAppDomain(e.Result.Job.Id);
+          wcfService.StoreFinishedJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, e.Result.Job.Id, new byte[] { }, 1, exception, true);
         }
       } else
@@ -497,4 +478,5 @@
           engines.Remove(id);
           jobs.Remove(id);
+          PluginCache.Instance.DeletePluginsForJob(id);
           GC.Collect();
         } catch (Exception ex) {
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/PluginCache.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/PluginCache.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/PluginCache.cs	(revision 4141)
@@ -1,12 +1,12 @@
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
-using System.Text;
+using System.Runtime.CompilerServices;
+using HeuristicLab.Hive.Client.Communication;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Hive.Client.Communication;
-using HeuristicLab.Hive.Client.Common;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.PluginInfrastructure.Manager;
 using HeuristicLab.Tracing;
-using System.IO;
 
 namespace HeuristicLab.Hive.Client.Core {
@@ -14,4 +14,11 @@
 
     private static PluginCache instance = null;
+
+    public const string PLUGIN_REPO = @"plugins\";
+
+    private List<PluginDescription> cachedPlugins = new List<PluginDescription>();
+
+    private PluginManager pm = new PluginManager(PLUGIN_REPO);
+
     public static PluginCache Instance {
       get {
@@ -20,72 +27,111 @@
         return instance;
       }
-    } 
-    
-    private List<CachedHivePluginInfoDto> pluginCache;
-    
-
+    }
     public PluginCache() {
-      pluginCache = new List<CachedHivePluginInfoDto>();
-    }
-    
-    public void AddPlugin(CachedHivePluginInfoDto plugin) {
-      pluginCache.Add(plugin);    
+      DoUpdateRun();
     }
 
-    public List<CachedHivePluginInfoDto> GetPlugins(List<HivePluginInfoDto> requests) {
+    private void DoUpdateRun() {
+      pm.DiscoverAndCheckPlugins();
+      cachedPlugins = new List<PluginDescription>(pm.Plugins);
+    }
+
+
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public bool CopyPluginsForJob(List<HivePluginInfoDto> requests, Guid jobId) {
+
+      String targetDir = PLUGIN_REPO + jobId.ToString() + "\\";
+
+      if (Directory.Exists(targetDir)) {
+        Directory.Delete(targetDir, true);
+      }
+
+      DirectoryInfo di = Directory.CreateDirectory(targetDir);
+
+      foreach (HivePluginInfoDto requestedPlugin in requests) {
+        PluginDescription pd =
+          cachedPlugins.Where(
+            cp =>
+            cp.Name == requestedPlugin.Name &&
+            cp.Version.Major == requestedPlugin.Version.Major &&
+            cp.Version.Minor == requestedPlugin.Version.Minor &&
+            cp.Version.Revision >= requestedPlugin.Version.Revision).
+            SingleOrDefault();
+        if (pd == null) {
+          return false;
+        }
+
+        foreach (IPluginFile ipf in pd.Files) {
+          File.Copy(ipf.Name, targetDir + ipf.Name.Split('\\').Last());
+        }
+      }
+      return true;
+    }
+
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    internal void PreparePlugins(List<HivePluginInfoDto> requiredPlugins) {
       Logger.Debug("Fetching plugins for job");
-      List<CachedHivePluginInfoDto> neededPlugins = new List<CachedHivePluginInfoDto>();
+      List<HivePluginInfoDto> localPlugins = new List<HivePluginInfoDto>();
+      List<HivePluginInfoDto> neededPlugins = new List<HivePluginInfoDto>();
       List<HivePluginInfoDto> missingPlugins = new List<HivePluginInfoDto>();
       bool found = false;
-            
-      foreach (HivePluginInfoDto info in requests) {
+
+      foreach (HivePluginInfoDto info in requiredPlugins) {
         //we MAY run in problems here - if there is a plugin twice in requests, there may be added two different versions of the plugin
-        foreach (CachedHivePluginInfoDto cache in pluginCache) {
-          if (info.Name.Equals(cache.Name) && info.Version.Equals(cache.Version)) {
+        foreach (PluginDescription cachedPlugin in cachedPlugins) {
+          if (info.Name.Equals(cachedPlugin.Name)) {
             Logger.Debug("Found plugin " + info.Name + ", " + info.Version);
-            neededPlugins.Add(cache);
+            localPlugins.Add(new HivePluginInfoDto() { Id = new Guid(), Name = info.Name, Version = info.Version, Update = true });
+            neededPlugins.Add(info);
             found = true;
+
             break;
           }
         }
-        if (!found)
-          Logger.Debug("Found NOT found " + info.Name + ", " + info.Version);
+        if (!found) {
+          Logger.Debug("Plugin NOT found " + info.Name + ", " + info.Version);
           missingPlugins.Add(info);
+        }
         found = false;
       }
 
-      Logger.Debug("Requesting missing plugins");
-      List<CachedHivePluginInfoDto> receivedPlugins = WcfService.Instance.RequestPlugins(missingPlugins);
-      Logger.Debug("Requested missing plugins");
+      Logger.Debug("First run - Update the plugins in the cache");
 
-      if (receivedPlugins != null) {
-        neededPlugins.AddRange(receivedPlugins);
-        pluginCache.AddRange(receivedPlugins);
-      } else
-        Logger.Error("Fetching of the plugins failed!");
+      localPlugins.AddRange(missingPlugins);
 
-      return neededPlugins;
+      List<CachedHivePluginInfoDto> updateablePlugins = WcfService.Instance.RequestPlugins(localPlugins);
+
+      foreach (CachedHivePluginInfoDto updateablePlugin in updateablePlugins) {
+        PluginDescription pd =
+          cachedPlugins.Where(cachedPlugin => cachedPlugin.Name.Equals(updateablePlugin.Name)).SingleOrDefault();
+
+        if (pd != null) {
+          Logger.Debug("deleting old files");
+          foreach (IPluginFile ipf in pd.Files) {
+            File.Delete(ipf.Name);
+          }
+        }
+
+        Logger.Debug("deleted old files");
+        Logger.Debug("creating new files");
+
+
+
+        foreach (HivePluginFile pf in updateablePlugin.PluginFiles) {
+          File.WriteAllBytes(PLUGIN_REPO + pf.Name.Split('\\').Last(), pf.BinaryFile);
+        }
+
+        Logger.Debug("created new files");
+        DoUpdateRun();
+      }
     }
 
-
-    internal void PreparePlugins(List<HivePluginInfoDto> requiredPlugins) {
-      List<HivePluginInfoDto> missingPlugins = new List<HivePluginInfoDto>();
-      foreach (HivePluginInfoDto requiredPlugin in requiredPlugins) {
-        if(ApplicationManager.Manager.Plugins.Count(ipd => ipd.Version.Major == requiredPlugin.Version.Major && ipd.Version.Minor >= requiredPlugin.Version.Minor) == 0) {
-          missingPlugins.Add(requiredPlugin);             
-        }
+    internal void DeletePluginsForJob(Guid id) {
+      try {
+        Logger.Debug("unloading...");
+        Directory.Delete(Path.Combine(PLUGIN_REPO, id.ToString()), true);
+      } catch (Exception ex) {
+        Logger.Debug("failed while unloading " + id + " with exception " + ex);
       }
-
-      Logger.Debug("Requesting missing plugins");
-      List<CachedHivePluginInfoDto> receivedPlugins = WcfService.Instance.RequestPlugins(missingPlugins);
-      Logger.Debug("Requested missing plugins");
-
-      foreach (CachedHivePluginInfoDto receivedPlugin in receivedPlugins) {
-        foreach (HivePluginFile hpf in receivedPlugin.PluginFiles) {
-          Logger.Info("writing file " + hpf.Name);
-          File.WriteAllBytes("C:\\temp\\" + hpf.Name.Split('\\').Last(), hpf.BinaryFile);
-        }        
-      }
-
     }
   }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/ExecutionEnginePlugin.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/ExecutionEnginePlugin.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/ExecutionEnginePlugin.cs	(revision 4141)
@@ -30,4 +30,5 @@
   [PluginFile("HeuristicLab.Hive.Client.ExecutionEngine-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
   [PluginDependency("HeuristicLab.Hive.Client.Common", "3.3")]
   [PluginDependency("HeuristicLab.Hive.Client.Communication", "3.3")]
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Executor.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Executor.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Executor.cs	(revision 4141)
@@ -36,4 +36,5 @@
     public IJob Job { get; set; }
     public MessageContainer.MessageType CurrentMessage { get; set; }
+    public Exception CurrentException { get; set; }
     public MessageQueue Queue { get; set; }
 
@@ -64,5 +65,7 @@
 
     void Job_JobFailed(object sender, EventArgs e) {
-      Queue.AddMessage(new MessageContainer(MessageContainer.MessageType.JobFailed, JobId));
+      HeuristicLab.Common.EventArgs<Exception> ex = (HeuristicLab.Common.EventArgs<Exception>)e;
+      CurrentException = ex.Value;
+      Queue.AddMessage(new MessageContainer(MessageContainer.MessageType.FinishedJob, JobId));
     }
 
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ApplicationConstants.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ApplicationConstants.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ApplicationConstants.cs	(revision 4141)
@@ -87,4 +87,5 @@
     public static string RESPONSE_COMMUNICATOR_SEND_JOBRESULT = "Please send the Jobresult to the server";
     public static string RESPONSE_COMMUNICATOR_PLUGINS_SENT = "Communicator.PluginsSent";
+    public static string RESPONSE_COMMUNICATOR_PLUGINS_NOT_AVAIL = "Communicator.PluginsNotAvail";
     public static string RESPONSE_COMMUNICATOR_JOB_WAS_ABORTED = "Job was aborted";
 
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientDto.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientDto.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientDto.cs	(revision 4141)
@@ -27,8 +27,8 @@
 using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-                                   
+
 namespace HeuristicLab.Hive.Contracts.BusinessObjects {
 
-  public enum State { NullState, Idle, Calculating, Offline, Finished, Abort, RequestSnapshot, RequestSnapshotSent, Pending };
+  public enum State { NullState, Idle, Calculating, Offline, Finished, Abort, RequestSnapshot, RequestSnapshotSent, Pending, Failed };
   public enum CalendarState { Fetch, ForceFetch, Fetching, Fetched, NotAllowedToFetch };
 
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs	(revision 4141)
@@ -45,4 +45,8 @@
     private string storableVersion;
 
+    [Storable]
+    [DataMember]
+    public Boolean Update { get; set; }
+
     public HivePluginInfoDto() { }
 
@@ -64,4 +68,5 @@
       clone.Name = this.Name;
       clone.Version = (Version)this.Version.Clone();
+      clone.Update = this.Update;
       return clone;
     }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobDto.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobDto.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobDto.cs	(revision 4141)
@@ -53,4 +53,7 @@
     [Storable]
     [DataMember]
+    public String Exception { get; set; }
+    [Storable]
+    [DataMember]
     public DateTime? DateCreated { get; set; }
     [Storable]
@@ -79,4 +82,6 @@
     public ProjectDto Project { get; set; }
 
+    
+
     public override string ToString() {
       return base.ToString() + "State: " + State + ", [Ressource : " + Client + " ] , DateCreated: " + DateCreated + ", DateCalculated: " + DateCalculated +
@@ -98,4 +103,5 @@
       clone.DateCreated = this.DateCreated;
       clone.DateFinished = this.DateFinished;
+      clone.Exception = this.Exception;
       clone.Id = this.Id;
       clone.MemoryNeeded = this.MemoryNeeded;
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.Designer.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.Designer.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.Designer.cs	(revision 4141)
@@ -58,4 +58,5 @@
       this.logTabPage = new System.Windows.Forms.TabPage();
       this.logView = new HeuristicLab.Core.Views.LogView();
+      this.requestSnapshotButton = new System.Windows.Forms.Button();
       this.snapshotGroupBox.SuspendLayout();
       this.jobStatusGroupBox.SuspendLayout();
@@ -247,4 +248,5 @@
       this.snapshotGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                   | System.Windows.Forms.AnchorStyles.Right)));
+      this.snapshotGroupBox.Controls.Add(this.requestSnapshotButton);
       this.snapshotGroupBox.Controls.Add(this.openSnapshotButton);
       this.snapshotGroupBox.Controls.Add(this.snapshotTimeText);
@@ -262,7 +264,7 @@
       // 
       this.openSnapshotButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.openSnapshotButton.Location = new System.Drawing.Point(426, 67);
+      this.openSnapshotButton.Location = new System.Drawing.Point(420, 67);
       this.openSnapshotButton.Name = "openSnapshotButton";
-      this.openSnapshotButton.Size = new System.Drawing.Size(101, 26);
+      this.openSnapshotButton.Size = new System.Drawing.Size(107, 26);
       this.openSnapshotButton.TabIndex = 25;
       this.openSnapshotButton.Text = "Open Snapshot";
@@ -415,4 +417,15 @@
       this.logView.Size = new System.Drawing.Size(536, 447);
       this.logView.TabIndex = 0;
+      // 
+      // requestSnapshotButton
+      // 
+      this.requestSnapshotButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.requestSnapshotButton.Location = new System.Drawing.Point(307, 67);
+      this.requestSnapshotButton.Name = "requestSnapshotButton";
+      this.requestSnapshotButton.Size = new System.Drawing.Size(107, 26);
+      this.requestSnapshotButton.TabIndex = 26;
+      this.requestSnapshotButton.Text = "Request Snapshot";
+      this.requestSnapshotButton.UseVisualStyleBackColor = true;
+      this.requestSnapshotButton.Click += new System.EventHandler(this.requestSnapshotButton_Click);
       // 
       // JobItemView
@@ -471,4 +484,5 @@
     private System.Windows.Forms.TabPage logTabPage;
     private Core.Views.LogView logView;
+    private System.Windows.Forms.Button requestSnapshotButton;
   }
 }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs	(revision 4141)
@@ -111,4 +111,8 @@
       MainFormManager.MainForm.ShowContent(job.Optimizer);
     }
+
+    private void requestSnapshotButton_Click(object sender, EventArgs e) {
+      
+    }
   }
 }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj	(revision 4141)
@@ -96,5 +96,4 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="OptimizerList.cs" />
     <Compile Include="JobItemList.cs" />
     <Compile Include="JobItem.cs" />
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs	(revision 4141)
@@ -53,4 +53,5 @@
     private const string itemDescription = "A runner for a single experiment, which's algorithms are executed in the Hive.";
     private const int resultPollingIntervalMs = 15000;
+    private const int snapshotPollingIntervalMs = 1000;
     private const int maxSnapshotRetries = 20;
     private object locker = new object();
@@ -169,8 +170,11 @@
       clone.executionTime = this.executionTime;
       clone.pendingOptimizersByJobId = new Dictionary<Guid, IOptimizer>();
+
       foreach (var pair in this.pendingOptimizersByJobId)
         clone.pendingOptimizersByJobId[pair.Key] = (IOptimizer)cloner.Clone(pair.Value);
+
       foreach (var pair in this.parentOptimizersByPendingOptimizer)
-        clone.parentOptimizersByPendingOptimizer[pair.Key] = (IOptimizer)cloner.Clone(pair.Value);
+        clone.parentOptimizersByPendingOptimizer[(IOptimizer)cloner.Clone(pair.Key)] = (IOptimizer)cloner.Clone(pair.Value);
+
       clone.log = (ILog)cloner.Clone(log);
       clone.stopPending = this.stopPending;
@@ -243,4 +247,8 @@
     public void Prepare() {
       if (experiment != null) {
+        StopResultPolling();
+        pendingOptimizersByJobId.Clear();
+        parentOptimizersByPendingOptimizer.Clear();
+        jobItems.Clear();
         experiment.Prepare();
         this.ExecutionState = Core.ExecutionState.Prepared;
@@ -251,4 +259,5 @@
     public void Start() {
       OnStarted();
+      ExecutionTime = new TimeSpan();
       lastUpdateTime = DateTime.Now;
       this.ExecutionState = Core.ExecutionState.Started;
@@ -295,5 +304,5 @@
     private void CreateResultPollingThreads() {
       foreach (JobItem jobItem in JobItems) {
-        if (!resultPollingThreads.ContainsKey(jobItem.JobDto.Id)) {
+        if (!resultPollingThreads.ContainsKey(jobItem.JobDto.Id) && jobItem.JobDto.State != State.Finished) {
           resultPollingThreads.Add(jobItem.JobDto.Id, CreateResultPollingThread(jobItem.JobDto));
         }
@@ -303,11 +312,13 @@
     public void StartResultPolling() {
       this.stopResultsPollingPending = false;
-      CreateResultPollingThreads();
-      foreach (Thread pollingThread in resultPollingThreads.Values) {
-        if (pollingThread.ThreadState != System.Threading.ThreadState.Running) {
-          pollingThread.Start();
-        }
-      }
       this.IsPollingResults = true;
+      lock (resultPollingThreads) {
+        CreateResultPollingThreads();
+        foreach (Thread pollingThread in resultPollingThreads.Values) {
+          if (pollingThread.ThreadState != System.Threading.ThreadState.Running) {
+            pollingThread.Start();
+          }
+        }
+      }
     }
 
@@ -452,5 +463,4 @@
 
           do {
-            Thread.Sleep(resultPollingIntervalMs);
             if (stopPending || !this.IsPollingResults) {
               return;
@@ -479,4 +489,6 @@
               UpdateSnapshot(jobResponse);
             }
+
+            Thread.Sleep(resultPollingIntervalMs);
           } while (restoredObject == null || restoredObject.ExecutionState != Core.ExecutionState.Stopped);
 
@@ -486,22 +498,25 @@
           IOptimizer originalOptimizer = pendingOptimizersByJobId[job.Id];
           IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer;
-
+          
           ReplaceOptimizer(parentOptimizersByPendingOptimizer[originalOptimizer], originalOptimizer, restoredOptimizer);
           pendingOptimizersByJobId.Remove(job.Id);
           parentOptimizersByPendingOptimizer.Remove(originalOptimizer);
 
+        } catch (ThreadInterruptedException exception) {
+
+        } finally {
+          GetJobItemById(job.Id).LogMessage("ResultsPolling Thread stopped");
+          lock (resultPollingThreads) {
+            resultPollingThreads.Remove(job.Id);
+            if (resultPollingThreads.Count == 0) {
+              IsPollingResults = false;
+            }
+          }
+
+          // check if finished
           if (pendingOptimizersByJobId.Count == 0) {
-            // finished
             this.ExecutionState = Core.ExecutionState.Stopped;
             OnStopped();
           }
-        } catch (ThreadInterruptedException exception) {
-
-        } finally {
-          GetJobItemById(job.Id).LogMessage("ResultsPolling Thread stopped");
-          resultPollingThreads.Remove(job.Id);
-          if (resultPollingThreads.Count == 0) {
-            IsPollingResults = false;
-          }
         }
       });
@@ -519,7 +534,47 @@
 
     private void LogMessage(string message) {
-      // HeuristicLab.Log is not Thread-Safe, so lock every call
+      // HeuristicLab.Log is not Thread-Safe, so lock on every call
       lock (locker) {
         log.LogMessage(message);
+      }
+    }
+
+    public void RequestSnapshot(Guid jobId) {
+      IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();
+      ResponseObject<SerializedJob> response;
+      int retryCount = 0;
+
+      Response snapShotResponse = executionEngineFacade.RequestSnapshot(jobId);
+      if (snapShotResponse.StatusMessage == ApplicationConstants.RESPONSE_JOB_IS_NOT_BEEING_CALCULATED) {
+        // job already finished
+        Logger.Debug("HiveEngine: Abort - GetLastResult(false)");
+        response = executionEngineFacade.GetLastSerializedResult(jobId, false, false);
+        Logger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success);
+      } else {
+        // server sent snapshot request to client
+        // poll until snapshot is ready
+        do {
+          Thread.Sleep(snapshotPollingIntervalMs);
+          Logger.Debug("HiveEngine: Abort - GetLastResult(true)");
+          response = executionEngineFacade.GetLastSerializedResult(jobId, false, true);
+          Logger.Debug("HiveEngine: Abort - Server: " + response.StatusMessage + " success: " + response.Success);
+          retryCount++;
+          // loop while
+          // 1. problem with communication with server
+          // 2. job result not yet ready
+        } while (
+          (retryCount < maxSnapshotRetries) && (
+          !response.Success ||
+          response.StatusMessage == ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE)
+          );
+      }
+      SerializedJob jobResult = response.Obj;
+      if (jobResult != null) {
+        Logger.Debug("HiveEngine: Results-polling - Got result!");
+
+        //job = XmlParser.Deserialize<Job>(new MemoryStream(jobResult.SerializedJobData));
+
+        throw new NotImplementedException("[chn] how to create a view in 3.3 and why should i do this here? shouldnt the caller of this method receive a result and decide what to do?");
+        //ControlManager.Manager.ShowControl(job.Engine.CreateView());
       }
     }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs	(revision 4141)
@@ -140,5 +140,5 @@
         }
         CheckForPendingJobs();
-//        DaoLocator.DestroyContext();
+        //        DaoLocator.DestroyContext();
         scope.Complete();
       }
@@ -591,5 +591,9 @@
       job.JobInfo.Percentage = percentage;
 
-      if (finished) {
+      if (exception != null) {
+        job.JobInfo.State = State.Failed;
+        job.JobInfo.Exception = exception.ToString();
+        job.JobInfo.DateFinished = DateTime.Now;
+      } else if (finished) {
         job.JobInfo.State = State.Finished;
         job.JobInfo.DateFinished = DateTime.Now;
@@ -710,17 +714,20 @@
       ResponsePlugin response = new ResponsePlugin();
       foreach (HivePluginInfoDto pluginInfo in pluginList) {
-        // TODO: Split version to major, minor and revision number
-        foreach (IPluginDescription currPlugin in ApplicationManager.Manager.Plugins) {
-          if (currPlugin.Name == pluginInfo.Name) {
-
-            CachedHivePluginInfoDto currCachedPlugin = new CachedHivePluginInfoDto {
-              Name = currPlugin.Name,
-              Version = currPlugin.Version
-            };
-
-            foreach (string fileName in from file in currPlugin.Files select file.Name) {
-              currCachedPlugin.PluginFiles.Add(new HivePluginFile(File.ReadAllBytes(fileName), fileName));
-            }
-            response.Plugins.Add(currCachedPlugin);
+        if (pluginInfo.Update) {
+          //check if there is a newer version         
+          IPluginDescription ipd =
+            ApplicationManager.Manager.Plugins.Where(pd => pd.Name == pluginInfo.Name && pd.Version.Major == pluginInfo.Version.Major && pd.Version.Minor == pluginInfo.Version.Minor && pd.Version.Revision > pluginInfo.Version.Revision).SingleOrDefault();
+          if (ipd != null) {
+            response.Plugins.Add(convertPluginDescriptorToDto(ipd));
+          }
+        } else {
+          IPluginDescription ipd =
+            ApplicationManager.Manager.Plugins.Where(pd => pd.Name == pluginInfo.Name && pd.Version.Major == pluginInfo.Version.Major && pd.Version.Minor == pluginInfo.Version.Minor && pd.Version.Revision >= pluginInfo.Version.Revision).SingleOrDefault();
+          if (ipd != null) {
+            response.Plugins.Add(convertPluginDescriptorToDto(ipd));
+          } else {
+            response.Success = false;
+            response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_PLUGINS_NOT_AVAIL;
+            return response;
           }
         }
@@ -730,4 +737,16 @@
 
       return response;
+    }
+
+    private CachedHivePluginInfoDto convertPluginDescriptorToDto(IPluginDescription currPlugin) {
+      CachedHivePluginInfoDto currCachedPlugin = new CachedHivePluginInfoDto {
+        Name = currPlugin.Name,
+        Version = currPlugin.Version
+      };
+
+      foreach (string fileName in from file in currPlugin.Files select file.Name) {
+        currCachedPlugin.PluginFiles.Add(new HivePluginFile(File.ReadAllBytes(fileName), fileName));
+      }
+      return currCachedPlugin;
     }
 
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DbTestApp.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DbTestApp.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DbTestApp.cs	(revision 4141)
@@ -232,5 +232,5 @@
       using (contextFactory.GetContext()) {
         //TestLINQImplementation();
-        TestLinqFileHandling();
+        //TestLinqFileHandling();
 
         //StressTest();
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.cs	(revision 4141)
@@ -3,5 +3,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.4927
+//     Runtime Version:4.0.30319.1
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
@@ -23,5 +23,5 @@
 	
 	
-	[System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.Hive.Linq.Test")]
+	[global::System.Data.Linq.Mapping.DatabaseAttribute(Name="HeuristicLab.Hive")]
 	public partial class HiveDataContext : System.Data.Linq.DataContext
 	{
@@ -168,5 +168,5 @@
 	}
 	
-	[Table(Name="dbo.AssignedResources")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.AssignedResources")]
 	public partial class AssignedResource : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -203,5 +203,5 @@
 		}
 		
-		[Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
 		public System.Guid ResourceId
 		{
@@ -227,5 +227,5 @@
 		}
 		
-		[Column(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
 		public System.Guid JobId
 		{
@@ -251,5 +251,5 @@
 		}
 		
-		[Column(Storage="_AssignedRessourcesId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AssignedRessourcesId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
 		public System.Guid AssignedRessourcesId
 		{
@@ -271,5 +271,5 @@
 		}
 		
-		[Association(Name="Resource_AssignedResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Resource Resource
 		{
@@ -305,5 +305,5 @@
 		}
 		
-		[Association(Name="Job_AssignedResource", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedResource", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Job Job
 		{
@@ -360,5 +360,5 @@
 	}
 	
-	[Table(Name="dbo.UptimeStatistics")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.UptimeStatistics")]
 	public partial class UptimeStatistic : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -396,5 +396,5 @@
 		}
 		
-		[Column(Storage="_UptimeStatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UptimeStatisticsId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
 		public System.Guid UptimeStatisticsId
 		{
@@ -416,5 +416,5 @@
 		}
 		
-		[Column(Storage="_Login", DbType="DateTime")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Login", DbType="DateTime")]
 		public System.DateTime Login
 		{
@@ -436,5 +436,5 @@
 		}
 		
-		[Column(Storage="_Logout", DbType="DateTime")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Logout", DbType="DateTime")]
 		public System.DateTime Logout
 		{
@@ -456,5 +456,5 @@
 		}
 		
-		[Column(Storage="_ResourceId", DbType="UniqueIdentifier")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier")]
 		public System.Guid ResourceId
 		{
@@ -480,5 +480,5 @@
 		}
 		
-		[Association(Name="Client_UptimeStatistic", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Client_UptimeStatistic", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
 		public Client Client
 		{
@@ -535,5 +535,5 @@
 	}
 	
-	[Table(Name="dbo.ClientConfig")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ClientConfig")]
 	public partial class ClientConfig : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -567,5 +567,5 @@
 		}
 		
-		[Column(Storage="_ClientConfigId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientConfigId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
 		public System.Guid ClientConfigId
 		{
@@ -587,5 +587,5 @@
 		}
 		
-		[Column(Storage="_UpDownTimeCalendar", DbType="Xml", UpdateCheck=UpdateCheck.Never)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpDownTimeCalendar", DbType="Xml", UpdateCheck=UpdateCheck.Never)]
 		public System.Xml.Linq.XElement UpDownTimeCalendar
 		{
@@ -607,5 +607,5 @@
 		}
 		
-		[Column(Storage="_HeartBeatIntervall", DbType="Int")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HeartBeatIntervall", DbType="Int")]
 		public System.Nullable<int> HeartBeatIntervall
 		{
@@ -627,5 +627,5 @@
 		}
 		
-		[Association(Name="ClientConfig_Client", Storage="_Clients", ThisKey="ClientConfigId", OtherKey="ClientConfigId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="ClientConfig_Client", Storage="_Clients", ThisKey="ClientConfigId", OtherKey="ClientConfigId")]
 		public EntitySet<Client> Clients
 		{
@@ -673,5 +673,5 @@
 	}
 	
-	[Table(Name="dbo.ClientGroup_Resource")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ClientGroup_Resource")]
 	public partial class ClientGroup_Resource : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -708,5 +708,5 @@
 		}
 		
-		[Column(Storage="_ClientGroup_RessourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientGroup_RessourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
 		public System.Guid ClientGroup_RessourceId
 		{
@@ -728,5 +728,5 @@
 		}
 		
-		[Column(Storage="_ClientGroupId", DbType="UniqueIdentifier NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientGroupId", DbType="UniqueIdentifier NOT NULL")]
 		public System.Guid ClientGroupId
 		{
@@ -752,5 +752,5 @@
 		}
 		
-		[Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
 		public System.Guid ResourceId
 		{
@@ -776,5 +776,5 @@
 		}
 		
-		[Association(Name="ClientGroup_ClientGroup_Resource", Storage="_ClientGroup", ThisKey="ClientGroupId", OtherKey="ResourceId", IsForeignKey=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="ClientGroup_ClientGroup_Resource", Storage="_ClientGroup", ThisKey="ClientGroupId", OtherKey="ResourceId", IsForeignKey=true)]
 		public ClientGroup ClientGroup
 		{
@@ -810,5 +810,5 @@
 		}
 		
-		[Association(Name="Resource_ClientGroup_Resource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ClientGroup_Resource", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Resource Resource
 		{
@@ -865,5 +865,5 @@
 	}
 	
-	[Table(Name="dbo.PluginInfo")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PluginInfo")]
 	public partial class PluginInfo : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -901,5 +901,5 @@
 		}
 		
-		[Column(Storage="_PluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
 		public System.Guid PluginId
 		{
@@ -921,5 +921,5 @@
 		}
 		
-		[Column(Storage="_Name", DbType="VarChar(MAX)")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)")]
 		public string Name
 		{
@@ -941,5 +941,5 @@
 		}
 		
-		[Column(Storage="_Version", DbType="VarChar(MAX)")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Version", DbType="VarChar(MAX)")]
 		public string Version
 		{
@@ -961,5 +961,5 @@
 		}
 		
-		[Column(Storage="_BuildDate", DbType="VarChar(20)")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BuildDate", DbType="VarChar(20)")]
 		public string BuildDate
 		{
@@ -981,5 +981,5 @@
 		}
 		
-		[Association(Name="PluginInfo_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="PluginId", OtherKey="PluginId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PluginInfo_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="PluginId", OtherKey="PluginId")]
 		public EntitySet<RequiredPlugin> RequiredPlugins
 		{
@@ -1027,5 +1027,5 @@
 	}
 	
-	[Table(Name="dbo.Project")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Project")]
 	public partial class Project : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -1055,5 +1055,5 @@
 		}
 		
-		[Column(Storage="_ProjectId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
 		public System.Guid ProjectId
 		{
@@ -1075,5 +1075,5 @@
 		}
 		
-		[Column(Storage="_Name", DbType="VarChar(MAX)")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)")]
 		public string Name
 		{
@@ -1095,5 +1095,5 @@
 		}
 		
-		[Association(Name="Project_Job", Storage="_Jobs", ThisKey="ProjectId", OtherKey="ProjectId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_Job", Storage="_Jobs", ThisKey="ProjectId", OtherKey="ProjectId")]
 		public EntitySet<Job> Jobs
 		{
@@ -1141,5 +1141,5 @@
 	}
 	
-	[Table(Name="dbo.RequiredPlugins")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.RequiredPlugins")]
 	public partial class RequiredPlugin : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -1176,5 +1176,5 @@
 		}
 		
-		[Column(Storage="_RequiredPluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RequiredPluginId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)]
 		public System.Guid RequiredPluginId
 		{
@@ -1196,5 +1196,5 @@
 		}
 		
-		[Column(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", DbType="UniqueIdentifier NOT NULL")]
 		public System.Guid JobId
 		{
@@ -1220,5 +1220,5 @@
 		}
 		
-		[Column(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PluginId", DbType="UniqueIdentifier NOT NULL")]
 		public System.Guid PluginId
 		{
@@ -1244,5 +1244,5 @@
 		}
 		
-		[Association(Name="PluginInfo_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PluginInfo_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public PluginInfo PluginInfo
 		{
@@ -1278,5 +1278,5 @@
 		}
 		
-		[Association(Name="Job_RequiredPlugin", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_RequiredPlugin", Storage="_Job", ThisKey="JobId", OtherKey="JobId", IsForeignKey=true)]
 		public Job Job
 		{
@@ -1333,8 +1333,8 @@
 	}
 	
-	[Table(Name="dbo.Resource")]
-	[InheritanceMapping(Code="RESOURCE", Type=typeof(Resource))]
-	[InheritanceMapping(Code="CLIENT", Type=typeof(Client), IsDefault=true)]
-	[InheritanceMapping(Code="GROUP", Type=typeof(ClientGroup))]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Resource")]
+	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="RESOURCE", Type=typeof(Resource))]
+	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="CLIENT", Type=typeof(Client), IsDefault=true)]
+	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="GROUP", Type=typeof(ClientGroup))]
 	public partial class Resource : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -1374,5 +1374,5 @@
 		}
 		
-		[Column(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
 		public System.Guid ResourceId
 		{
@@ -1394,5 +1394,5 @@
 		}
 		
-		[Column(Storage="_Name", DbType="VarChar(MAX)")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="VarChar(MAX)")]
 		public string Name
 		{
@@ -1414,5 +1414,5 @@
 		}
 		
-		[Column(Storage="_ResourceType", IsDiscriminator=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceType", IsDiscriminator=true)]
 		public string ResourceType
 		{
@@ -1434,5 +1434,5 @@
 		}
 		
-		[Association(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_AssignedResource", Storage="_AssignedResources", ThisKey="ResourceId", OtherKey="ResourceId")]
 		public EntitySet<AssignedResource> AssignedResources
 		{
@@ -1447,5 +1447,5 @@
 		}
 		
-		[Association(Name="Resource_ClientGroup_Resource", Storage="_ClientGroup_Resources_Parents", ThisKey="ResourceId", OtherKey="ResourceId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ClientGroup_Resource", Storage="_ClientGroup_Resources_Parents", ThisKey="ResourceId", OtherKey="ResourceId")]
 		public EntitySet<ClientGroup_Resource> ClientGroup_Resources_Parents
 		{
@@ -1460,5 +1460,5 @@
 		}
 		
-		[Association(Name="Resource_UptimeCalendar", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_UptimeCalendar", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")]
 		public EntitySet<UptimeCalendar> UptimeCalendars
 		{
@@ -1593,5 +1593,5 @@
 		}
 		
-		[Column(Storage="_CPUSpeed", DbType="Int")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPUSpeed", DbType="Int")]
 		public System.Nullable<int> CPUSpeed
 		{
@@ -1613,5 +1613,5 @@
 		}
 		
-		[Column(Storage="_Memory", DbType="Int")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Memory", DbType="Int")]
 		public System.Nullable<int> Memory
 		{
@@ -1633,5 +1633,5 @@
 		}
 		
-		[Column(Storage="_Login", DbType="DateTime")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Login", DbType="DateTime")]
 		public System.Nullable<System.DateTime> Login
 		{
@@ -1653,5 +1653,5 @@
 		}
 		
-		[Column(Storage="_Status", DbType="VarChar(MAX)")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="VarChar(MAX)")]
 		public string Status
 		{
@@ -1673,5 +1673,5 @@
 		}
 		
-		[Column(Storage="_CalendarSyncStatus", DbType="VarChar(MAX)")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalendarSyncStatus", DbType="VarChar(MAX)")]
 		public string CalendarSyncStatus
 		{
@@ -1693,5 +1693,5 @@
 		}
 		
-		[Column(Storage="_UseCalendarFromResourceId", DbType="UniqueIdentifier")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UseCalendarFromResourceId", DbType="UniqueIdentifier")]
 		public System.Nullable<System.Guid> UseCalendarFromResourceId
 		{
@@ -1713,5 +1713,5 @@
 		}
 		
-		[Column(Storage="_ClientConfigId", DbType="UniqueIdentifier")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientConfigId", DbType="UniqueIdentifier")]
 		public System.Nullable<System.Guid> ClientConfigId
 		{
@@ -1737,5 +1737,5 @@
 		}
 		
-		[Column(Storage="_NumberOfCores", DbType="Int")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfCores", DbType="Int")]
 		public System.Nullable<int> NumberOfCores
 		{
@@ -1757,5 +1757,5 @@
 		}
 		
-		[Column(Storage="_NumberOfFreeCores", DbType="Int")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NumberOfFreeCores", DbType="Int")]
 		public System.Nullable<int> NumberOfFreeCores
 		{
@@ -1777,5 +1777,5 @@
 		}
 		
-		[Column(Storage="_FreeMemory", DbType="Int")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FreeMemory", DbType="Int")]
 		public System.Nullable<int> FreeMemory
 		{
@@ -1797,5 +1797,5 @@
 		}
 		
-		[Association(Name="Client_UptimeStatistic", Storage="_UptimeStatistics", ThisKey="ResourceId", OtherKey="ResourceId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Client_UptimeStatistic", Storage="_UptimeStatistics", ThisKey="ResourceId", OtherKey="ResourceId")]
 		public EntitySet<UptimeStatistic> UptimeStatistics
 		{
@@ -1810,5 +1810,5 @@
 		}
 		
-		[Association(Name="Client_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="ResourceId", DeleteRule="SET NULL")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Client_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="ResourceId", DeleteRule="SET NULL")]
 		public EntitySet<Job> Jobs
 		{
@@ -1823,5 +1823,5 @@
 		}
 		
-		[Association(Name="ClientConfig_Client", Storage="_ClientConfig", ThisKey="ClientConfigId", OtherKey="ClientConfigId", IsForeignKey=true, DeleteRule="SET NULL")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="ClientConfig_Client", Storage="_ClientConfig", ThisKey="ClientConfigId", OtherKey="ClientConfigId", IsForeignKey=true, DeleteRule="SET NULL")]
 		public ClientConfig ClientConfig
 		{
@@ -1899,5 +1899,5 @@
 		}
 		
-		[Association(Name="ClientGroup_ClientGroup_Resource", Storage="_ClientGroup_Resources_Children", ThisKey="ResourceId", OtherKey="ClientGroupId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="ClientGroup_ClientGroup_Resource", Storage="_ClientGroup_Resources_Children", ThisKey="ResourceId", OtherKey="ClientGroupId")]
 		public EntitySet<ClientGroup_Resource> ClientGroup_Resources_Children
 		{
@@ -1925,5 +1925,5 @@
 	}
 	
-	[Table(Name="dbo.Job")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Job")]
 	public partial class Job : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -1940,4 +1940,6 @@
 		
 		private System.Nullable<double> _Percentage;
+		
+		private string _Exception;
 		
 		private System.Data.Linq.Link<System.Data.Linq.Binary> _SerializedJob;
@@ -1985,4 +1987,6 @@
     partial void OnPercentageChanging(System.Nullable<double> value);
     partial void OnPercentageChanged();
+    partial void OnExceptionChanging(string value);
+    partial void OnExceptionChanged();
     partial void OnSerializedJobChanging(System.Data.Linq.Binary value);
     partial void OnSerializedJobChanged();
@@ -2016,5 +2020,5 @@
 		}
 		
-		[Column(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
 		public System.Guid JobId
 		{
@@ -2036,5 +2040,5 @@
 		}
 		
-		[Column(Storage="_ParentJobId", DbType="UniqueIdentifier")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ParentJobId", DbType="UniqueIdentifier")]
 		public System.Nullable<System.Guid> ParentJobId
 		{
@@ -2060,5 +2064,5 @@
 		}
 		
-		[Column(Storage="_JobState", DbType="VarChar(MAX)")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobState", DbType="VarChar(MAX)")]
 		public string JobState
 		{
@@ -2080,5 +2084,5 @@
 		}
 		
-		[Column(Storage="_ResourceId", DbType="UniqueIdentifier")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier")]
 		public System.Nullable<System.Guid> ResourceId
 		{
@@ -2104,5 +2108,5 @@
 		}
 		
-		[Column(Storage="_Percentage", DbType="Float")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Percentage", DbType="Float")]
 		public System.Nullable<double> Percentage
 		{
@@ -2124,5 +2128,25 @@
 		}
 		
-		[Column(Storage="_SerializedJob", DbType="VarBinary(MAX)", UpdateCheck=UpdateCheck.Never)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Exception", DbType="VarChar(MAX)")]
+		public string Exception
+		{
+			get
+			{
+				return this._Exception;
+			}
+			set
+			{
+				if ((this._Exception != value))
+				{
+					this.OnExceptionChanging(value);
+					this.SendPropertyChanging();
+					this._Exception = value;
+					this.SendPropertyChanged("Exception");
+					this.OnExceptionChanged();
+				}
+			}
+		}
+		
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SerializedJob", DbType="VarBinary(MAX)", UpdateCheck=UpdateCheck.Never)]
 		public System.Data.Linq.Binary SerializedJob
 		{
@@ -2144,5 +2168,5 @@
 		}
 		
-		[Column(Storage="_DateCreated", DbType="DateTime")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime")]
 		public System.Nullable<System.DateTime> DateCreated
 		{
@@ -2164,5 +2188,5 @@
 		}
 		
-		[Column(Storage="_DateCalculated", DbType="DateTime")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCalculated", DbType="DateTime")]
 		public System.Nullable<System.DateTime> DateCalculated
 		{
@@ -2184,5 +2208,5 @@
 		}
 		
-		[Column(Storage="_DateFinished", DbType="DateTime")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateFinished", DbType="DateTime")]
 		public System.Nullable<System.DateTime> DateFinished
 		{
@@ -2204,5 +2228,5 @@
 		}
 		
-		[Column(Storage="_Priority", DbType="Int NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Priority", DbType="Int NOT NULL")]
 		public int Priority
 		{
@@ -2224,5 +2248,5 @@
 		}
 		
-		[Column(Storage="_ProjectId", DbType="UniqueIdentifier")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="UniqueIdentifier")]
 		public System.Nullable<System.Guid> ProjectId
 		{
@@ -2248,5 +2272,5 @@
 		}
 		
-		[Column(Storage="_UserId", DbType="UniqueIdentifier")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier")]
 		public System.Nullable<System.Guid> UserId
 		{
@@ -2268,5 +2292,5 @@
 		}
 		
-		[Column(Storage="_CoresNeeded", DbType="Int NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CoresNeeded", DbType="Int NOT NULL")]
 		public int CoresNeeded
 		{
@@ -2288,5 +2312,5 @@
 		}
 		
-		[Column(Storage="_MemoryNeeded", DbType="Int NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MemoryNeeded", DbType="Int NOT NULL")]
 		public int MemoryNeeded
 		{
@@ -2308,5 +2332,5 @@
 		}
 		
-		[Association(Name="Job_AssignedResource", Storage="_AssignedResources", ThisKey="JobId", OtherKey="JobId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_AssignedResource", Storage="_AssignedResources", ThisKey="JobId", OtherKey="JobId")]
 		public EntitySet<AssignedResource> AssignedResources
 		{
@@ -2321,5 +2345,5 @@
 		}
 		
-		[Association(Name="Job_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="JobId", OtherKey="JobId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="JobId", OtherKey="JobId")]
 		public EntitySet<RequiredPlugin> RequiredPlugins
 		{
@@ -2334,5 +2358,5 @@
 		}
 		
-		[Association(Name="Job_Job", Storage="_Jobs", ThisKey="JobId", OtherKey="ParentJobId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Jobs", ThisKey="JobId", OtherKey="ParentJobId")]
 		public EntitySet<Job> Jobs
 		{
@@ -2347,5 +2371,5 @@
 		}
 		
-		[Association(Name="Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Job_Job", Storage="_Job1", ThisKey="ParentJobId", OtherKey="JobId", IsForeignKey=true)]
 		public Job Job1
 		{
@@ -2381,5 +2405,5 @@
 		}
 		
-		[Association(Name="Project_Job", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="SET NULL")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Project_Job", Storage="_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true, DeleteRule="SET NULL")]
 		public Project Project
 		{
@@ -2415,5 +2439,5 @@
 		}
 		
-		[Association(Name="Client_Job", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Client_Job", Storage="_Client", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
 		public Client Client
 		{
@@ -2506,5 +2530,5 @@
 	}
 	
-	[Table(Name="dbo.UptimeCalendar")]
+	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.UptimeCalendar")]
 	public partial class UptimeCalendar : INotifyPropertyChanging, INotifyPropertyChanged
 	{
@@ -2554,5 +2578,5 @@
 		}
 		
-		[Column(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
 		public System.Guid UptimeCalendarId
 		{
@@ -2574,5 +2598,5 @@
 		}
 		
-		[Column(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier NOT NULL")]
 		public System.Guid ResourceId
 		{
@@ -2598,5 +2622,5 @@
 		}
 		
-		[Column(Storage="_StartDate", DbType="DateTime NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime NOT NULL")]
 		public System.DateTime StartDate
 		{
@@ -2618,5 +2642,5 @@
 		}
 		
-		[Column(Storage="_EndDate", DbType="DateTime NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime NOT NULL")]
 		public System.DateTime EndDate
 		{
@@ -2638,5 +2662,5 @@
 		}
 		
-		[Column(Storage="_AllDayEvent", DbType="Bit NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AllDayEvent", DbType="Bit NOT NULL")]
 		public bool AllDayEvent
 		{
@@ -2658,5 +2682,5 @@
 		}
 		
-		[Column(Storage="_Recurring", DbType="Bit NOT NULL")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Recurring", DbType="Bit NOT NULL")]
 		public bool Recurring
 		{
@@ -2678,5 +2702,5 @@
 		}
 		
-		[Column(Storage="_RecurringId", DbType="UniqueIdentifier")]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecurringId", DbType="UniqueIdentifier")]
 		public System.Guid RecurringId
 		{
@@ -2698,5 +2722,5 @@
 		}
 		
-		[Association(Name="Resource_UptimeCalendar", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_UptimeCalendar", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Resource Resource
 		{
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.xml
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.xml	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HiveDataContext.xml	(revision 4141)
@@ -1,4 +1,4 @@
 ﻿<?xml version="1.0" encoding="utf-8"?>
-<Database Name="HeuristicLab.Hive.Linq.Test" Class="HiveDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
+<Database Name="HeuristicLab.Hive" Class="HiveDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
   <Table Name="dbo.AssignedResources" Member="AssignedResources">
     <Type Name="AssignedResource">
@@ -99,4 +99,5 @@
       <Column Name="ResourceId" Member="ResourceId" DbType="UniqueIdentifier" Type="System.Guid" CanBeNull="true"/>
       <Column Name="Percentage" Member="Percentage" DbType="Float" Type="System.Double" CanBeNull="true"/>
+      <Column Name="Exception" Member="Exception" DbType="VarChar(MAX)" Type="System.String" CanBeNull="true"/>
       <Column Name="SerializedJob" Member="SerializedJob" DbType="VarBinary(MAX)" UpdateCheck="Never" Type="System.Data.Linq.Binary" IsDelayLoaded="true"/>
       <Column Name="DateCreated" Member="DateCreated" DbType="DateTime" Type="System.DateTime" CanBeNull="true"/>
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs	(revision 4140)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs	(revision 4141)
@@ -167,4 +167,5 @@
 
       target.Percentage = source.Percentage;
+      target.Exception = source.Exception;
 
       target.Priority = source.Priority;
@@ -193,5 +194,6 @@
       target.DateFinished = source.DateFinished;
       target.Id = source.JobId;
-       
+
+      target.Exception = source.Exception;
       target.Percentage = source.Percentage;
       
