Index: /trunk/sources/HeuristicLab.Hive.Client.Common/HeuristicLab.Hive.Client.Common.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Common/HeuristicLab.Hive.Client.Common.csproj	(revision 767)
+++ /trunk/sources/HeuristicLab.Hive.Client.Common/HeuristicLab.Hive.Client.Common.csproj	(revision 768)
@@ -74,4 +74,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Core\HeuristicLab.Core.csproj">
+      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
+      <Name>HeuristicLab.Core</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
Index: /trunk/sources/HeuristicLab.Hive.Client.Common/JobBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Common/JobBase.cs	(revision 767)
+++ /trunk/sources/HeuristicLab.Hive.Client.Common/JobBase.cs	(revision 768)
@@ -4,18 +4,19 @@
 using System.Text;
 using System.Threading;
+using System.Xml;
+using HeuristicLab.Core;
 
 namespace HeuristicLab.Hive.Client.Common {
 
-  public delegate void Callback();
-
   abstract public class JobBase {
-
-    public event Callback JobAborted;
 
     private Thread thread = null;
     
     public int Progress { get; set; }
-    private bool abort = false;
-    private bool running = false;
+    
+    protected bool abort = false;
+    public bool Running { get; set; }
+
+    public event EventHandler JobStopped;
 
     abstract public void Run();
@@ -24,5 +25,5 @@
       thread = new Thread(new ThreadStart(Run));
       thread.Start();
-      running = true;
+      Running = true;
     }
 
@@ -31,4 +32,16 @@
     }
 
+    protected void OnJobStopped() {
+      Console.WriteLine("Job has finished");
+      Running = false;
+      if (JobStopped != null)
+        JobStopped(this, new EventArgs());
+    }
+
+    public XmlNode GetXmlNode() {
+      XmlDocument doc = PersistenceManager.CreateXmlDocument();
+      return doc.CreateNode(XmlNodeType.Element, "testnode", null);      
+    }
+
     public JobBase() {    
     }
Index: /trunk/sources/HeuristicLab.Hive.Client.Common/MessageContainer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Common/MessageContainer.cs	(revision 767)
+++ /trunk/sources/HeuristicLab.Hive.Client.Common/MessageContainer.cs	(revision 768)
@@ -32,8 +32,8 @@
   public class MessageContainer {
 
-    public enum MessageType { FetchJob, AbortJob, RequestSnapshot, FinishedJob };
+    public enum MessageType { FetchJob, AbortJob, JobAborted, RequestSnapshot, FinishedJob, NoMessage, SnapshotReady };
 
     public MessageType Message { get; set; }
-    public int JobId { get; set; }
+    public long JobId { get; set; }
 
     public MessageContainer(MessageType message) {
@@ -41,5 +41,5 @@
       JobId = 0;
     }
-    public MessageContainer(MessageType message, int jobId) {
+    public MessageContainer(MessageType message, long jobId) {
       Message = message;
       JobId = jobId;
Index: /trunk/sources/HeuristicLab.Hive.Client.Common/TestJob.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Common/TestJob.cs	(revision 767)
+++ /trunk/sources/HeuristicLab.Hive.Client.Common/TestJob.cs	(revision 768)
@@ -7,5 +7,15 @@
   public class TestJob: JobBase {
     public override void Run() {
-      Console.WriteLine("The Job Thread is running!");
+      for (int x = 0; x < 10; x++) {
+        for (int y = 0; y < Int32.MaxValue; y++) ;
+        if (abort == true) {
+          Logging.getInstance().Info(this.ToString(), "Job Processing aborted");
+          //Console.WriteLine("Job Abort Processing");
+          break;
+        }
+        Logging.getInstance().Info(this.ToString(), "Iteration " + x + " done");
+        //Console.WriteLine("Iteration " + x + " done");
+      }      
+      OnJobStopped();
     }
   }
Index: /trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs	(revision 767)
+++ /trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs	(revision 768)
@@ -24,27 +24,57 @@
 using System.Linq;
 using System.Text;
+using HeuristicLab.Hive.Client.ExecutionEngine;
 using HeuristicLab.Hive.Client.Common;
+using System.Threading;
+
 
 namespace HeuristicLab.Hive.Client.Core {
   public class Core {
+
+    Dictionary<long, Executor> engines = new Dictionary<long, Executor>();
+    
     public void Start() {
       Logging.getInstance().Info(this.ToString(), "Info Message");
-      Logging.getInstance().Error(this.ToString(), "Error Message");
-      Logging.getInstance().Error(this.ToString(), "Exception Message", new Exception("Exception"));      
+      //Logging.getInstance().Error(this.ToString(), "Error Message");
+      //Logging.getInstance().Error(this.ToString(), "Exception Message", new Exception("Exception"));      
 
       Heartbeat beat = new Heartbeat();
-      beat.Interval = 1000;
+      beat.Interval = 5000;
       beat.StartHeartbeat();
-      ConfigurationManager.GetInstance().Connect(Guid.Empty);
-      TestJob job = new TestJob();
-      job.Start();
-         
+
       MessageQueue queue = MessageQueue.GetInstance();
+      
+      JobBase job = new TestJob();
+      
+      ExecutionEngine.Executor engine = new ExecutionEngine.Executor();
+      engine.Job = job;
+      engine.JobId = 1L;
+      engine.Queue = queue;      
+      engine.Start();
+      engines.Add(engine.JobId, engine);
 
+      Thread.Sleep(15000);
+      engine.RequestSnapshot();
       while (true) {
         MessageContainer container = queue.GetMessage();
-        Console.WriteLine(container.Message.ToString());
+        Logging.getInstance().Info(this.ToString(), container.Message.ToString()); 
+        DetermineAction(container);
+
+        
       }
     }
+
+    private void DetermineAction(MessageContainer container) {
+      if(container.Message == MessageContainer.MessageType.AbortJob)
+        engines[container.JobId].Abort();
+      else if (container.Message == MessageContainer.MessageType.JobAborted)
+        //kill appdomain
+        Console.WriteLine("tmp");
+      else if (container.Message == MessageContainer.MessageType.RequestSnapshot)
+        engines[container.JobId].RequestSnapshot();
+      else if (container.Message == MessageContainer.MessageType.SnapshotReady)
+        // must be async!
+        engines[container.JobId].GetSnapshot();
+    }        
   }
 }
Index: /trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs	(revision 767)
+++ /trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs	(revision 768)
@@ -61,5 +61,5 @@
     void heartbeatTimer_Elapsed(object sender, ElapsedEventArgs e) {
       Console.WriteLine("tick");
-      MessageQueue.GetInstance().AddMessage(MessageContainer.MessageType.FetchJob);
+      //MessageQueue.GetInstance().AddMessage(MessageContainer.MessageType.FetchJob);
     }
 
Index: /trunk/sources/HeuristicLab.Hive.Client.Core/HeuristicLab.Hive.Client.Core.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.Core/HeuristicLab.Hive.Client.Core.csproj	(revision 767)
+++ /trunk/sources/HeuristicLab.Hive.Client.Core/HeuristicLab.Hive.Client.Core.csproj	(revision 768)
@@ -86,4 +86,8 @@
       <Name>HeuristicLab.Hive.Client.Common</Name>
     </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Hive.Client.ExecutionEngine\HeuristicLab.Hive.Client.ExecutionEngine.csproj">
+      <Project>{1605256A-1CB3-44AB-AAFF-577093EE5789}</Project>
+      <Name>HeuristicLab.Hive.Client.ExecutionEngine</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
Index: /trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/HeuristicLab.Hive.Client.ExecutionEngine.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/HeuristicLab.Hive.Client.ExecutionEngine.csproj	(revision 767)
+++ /trunk/sources/HeuristicLab.Hive.Client.ExecutionEngine/HeuristicLab.Hive.Client.ExecutionEngine.csproj	(revision 768)
@@ -48,4 +48,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Executor.cs" />
     <Compile Include="ExecutionEnginePlugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
@@ -56,4 +57,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Hive.Client.Common\HeuristicLab.Hive.Client.Common.csproj">
+      <Project>{89F4BC52-C174-481E-9BD2-3814171020E8}</Project>
+      <Name>HeuristicLab.Hive.Client.Common</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
