Index: /trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs	(revision 1654)
+++ /trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs	(revision 1655)
@@ -211,5 +211,5 @@
           files.AddRange(plugininfo.PluginFiles);
         
-        AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, null, files);
+        AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, typeof(Engine.HiveEngine), files);
         appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
         lock (engines) {                    
@@ -298,5 +298,6 @@
 
     void appDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
-      Logging.Instance.Error(this.ToString(), " Exception: " + e.ExceptionObject.ToString());
+      Logging.Instance.Error(this.ToString(), "Exception in AppDomain: " + e.ExceptionObject.ToString());
+      
     }
   }
Index: /trunk/sources/HeuristicLab.Hive.Client.Core/3.2/HeuristicLab.Hive.Client.Core-3.2.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Core/3.2/HeuristicLab.Hive.Client.Core-3.2.csproj	(revision 1654)
+++ /trunk/sources/HeuristicLab.Hive.Client.Core/3.2/HeuristicLab.Hive.Client.Core-3.2.csproj	(revision 1655)
@@ -143,4 +143,8 @@
       <Name>HeuristicLab.Hive.Contracts-3.2</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Hive.Engine\3.2\HeuristicLab.Hive.Engine-3.2.csproj">
+      <Project>{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}</Project>
+      <Name>HeuristicLab.Hive.Engine-3.2</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Hive.JobBase\3.2\HeuristicLab.Hive.JobBase-3.2.csproj">
       <Project>{21187322-52DD-4243-80A4-A85F0263E63B}</Project>
Index: /trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/3.2/Executor.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/3.2/Executor.cs	(revision 1654)
+++ /trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/3.2/Executor.cs	(revision 1655)
@@ -57,5 +57,10 @@
       //Job = new TestJob();
       Job.JobStopped += new EventHandler(Job_JobStopped);
+      Job.JobFailed += new EventHandler(Job_JobFailed);
       Job.Start();
+    }
+
+    void Job_JobFailed(object sender, EventArgs e) {
+      Queue.AddMessage(new MessageContainer(MessageContainer.MessageType.JobFailed, JobId));
     }
 
Index: /trunk/sources/HeuristicLab.Hive.Contracts/3.2/MessageContainer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Contracts/3.2/MessageContainer.cs	(revision 1654)
+++ /trunk/sources/HeuristicLab.Hive.Contracts/3.2/MessageContainer.cs	(revision 1655)
@@ -33,5 +33,5 @@
   public class MessageContainer {
 
-    public enum MessageType { FetchJob, AbortJob, JobAborted, RequestSnapshot, FinishedJob, NoMessage, SnapshotReady, Shutdown };
+    public enum MessageType { FetchJob, AbortJob, JobAborted, RequestSnapshot, FinishedJob, NoMessage, SnapshotReady, Shutdown, JobFailed };
 
     public MessageType Message { get; set; }
Index: /trunk/sources/HeuristicLab.Hive.Engine/3.2/Job.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Engine/3.2/Job.cs	(revision 1654)
+++ /trunk/sources/HeuristicLab.Hive.Engine/3.2/Job.cs	(revision 1655)
@@ -60,4 +60,5 @@
 
     public event EventHandler JobStopped;
+    public event EventHandler JobFailed;
 
     public long JobId {
Index: /trunk/sources/HeuristicLab.Hive.JobBase/3.2/Interfaces/IJob.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.JobBase/3.2/Interfaces/IJob.cs	(revision 1654)
+++ /trunk/sources/HeuristicLab.Hive.JobBase/3.2/Interfaces/IJob.cs	(revision 1655)
@@ -4,4 +4,5 @@
   public interface IJob: IStorable {
     event EventHandler JobStopped;
+    event EventHandler JobFailed;
     long JobId { get; set; }
     double Progress { get; }
Index: /trunk/sources/HeuristicLab.Hive.JobBase/3.2/JobBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.JobBase/3.2/JobBase.cs	(revision 1654)
+++ /trunk/sources/HeuristicLab.Hive.JobBase/3.2/JobBase.cs	(revision 1655)
@@ -34,4 +34,5 @@
     private Thread thread = null;
     public event EventHandler JobStopped;
+    public event EventHandler JobFailed;
     
     public long JobId { get; set; }    
@@ -42,7 +43,16 @@
 
     abstract public void Run();
+    private void SecureRun() {
+      try {
+        Run();
+      }
+      catch (Exception ex) {
+        if (JobFailed != null)
+          JobFailed(this, new EventArgs());
+      }
+    }
 
     public void Start() {
-      thread = new Thread(new ThreadStart(Run));
+      thread = new Thread(new ThreadStart(Run));      
       thread.Start();
       Running = true;
Index: /trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs	(revision 1654)
+++ /trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs	(revision 1655)
@@ -194,4 +194,6 @@
       PermissionSet pset;
 
+      
+
       DiscoveryService dService = new DiscoveryService();
       //get the declaring plugin of the job
@@ -227,10 +229,10 @@
       NotifyListeners(PluginManagerAction.Initializing, "All plugins");
 
-      if (assemblyFiles != null && assemblyFiles.Count > 0)
-        remoteRunner.LoadPlugins(assemblyFiles);
-    
-      //if (depPlugins != null && depPlugins.Count > 0) {        
-      //  remoteRunner.LoadPlugins(depPlugins);
-      //}
+      //if (assemblyFiles != null && assemblyFiles.Count > 0)
+      //  remoteRunner.LoadPlugins(assemblyFiles);
+      
+      if (depPlugins != null && depPlugins.Count > 0) {        
+        remoteRunner.LoadPlugins(depPlugins);
+      }
       NotifyListeners(PluginManagerAction.Initialized, "All plugins");
       return applicationDomain;
