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 4073)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/ExecutionEnginePlugin.cs	(revision 4073)
@@ -0,0 +1,38 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Hive.Client.ExecutionEngine {
+  [Plugin("HeuristicLab.Hive.Client.ExecutionEngine-3.2")]
+  [PluginFile("HeuristicLab.Hive.Client.ExecutionEngine-3.2.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Core-3.2")]
+  [PluginDependency("HeuristicLab.Hive.Client.Common-3.2")]
+  [PluginDependency("HeuristicLab.Hive.Client.Communication-3.2")]
+  [PluginDependency("HeuristicLab.Hive.Contracts-3.2")]
+  [PluginDependency("HeuristicLab.Hive.JobBase-3.2")] 
+  public class ExecutionEnginePlugin: PluginBase {
+  }
+}
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 4073)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Executor.cs	(revision 4073)
@@ -0,0 +1,147 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Hive.Client.Common;
+using System.Xml;
+using System.Xml.Serialization;
+using System.IO;
+using HeuristicLab.Core;
+using HeuristicLab.Hive.JobBase;
+using HeuristicLab.Hive.Contracts;
+
+namespace HeuristicLab.Hive.Client.ExecutionEngine {
+  public class Executor: MarshalByRefObject, IDisposable {
+    public Guid JobId { get; set; }
+    public IJob Job { get; set; }
+    public MessageContainer.MessageType CurrentMessage { get; set; }
+    public MessageQueue Queue { get; set; }
+
+    public bool JobIsFinished { get; set; }
+
+    public bool Running {
+      get {
+        return Job.Running;
+      }
+    }
+
+    public double Progress {
+      get {
+        return Job.Progress;
+      }
+    }
+
+    public DateTime CreationTime { get; set; }
+
+    public void Start(byte[] serializedJob) {
+      CreationTime = DateTime.Now;
+      Job = (IJob)PersistenceManager.RestoreFromGZip(serializedJob);
+      //debug
+      //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));
+    }
+
+    public void StartOnlyJob() {
+      Job.Start();
+    }
+
+    public void Abort() {
+      CurrentMessage = MessageContainer.MessageType.AbortJob;
+      Job.Stop();      
+    }
+
+    void Job_JobStopped(object sender, EventArgs e) {
+      if (CurrentMessage == MessageContainer.MessageType.NoMessage) {
+        Queue.AddMessage(new MessageContainer(MessageContainer.MessageType.FinishedJob, JobId));
+        JobIsFinished = true;
+      } else if (CurrentMessage == MessageContainer.MessageType.RequestSnapshot) {
+          Queue.AddMessage(new MessageContainer(MessageContainer.MessageType.SnapshotReady, JobId));
+      } else if (CurrentMessage == MessageContainer.MessageType.AbortJob) {
+          Queue.AddMessage(new MessageContainer(MessageContainer.MessageType.JobAborted, JobId));
+      }
+    }
+
+    public byte[] GetSnapshot() {
+      //if the job is still running, something went VERY bad.
+      if (Job.Running) {
+        return null;
+      } else {
+        // Clear the Status message
+        CurrentMessage = MessageContainer.MessageType.NoMessage;
+        // Pack the whole job inside an xml document
+        byte[] job = SerializeJobObject();        
+        // Restart the job
+        // Return the Snapshot
+        return job;
+      }
+    }
+
+    public byte[] GetFinishedJob() {
+      //Job isn't finished!
+      if (Job.Running) {
+        throw new InvalidStateException("Job is still running");
+      } else {
+        byte[] jobArr = SerializeJobObject();        
+        return jobArr;
+      }
+    }    
+
+
+    public void RequestSnapshot() {
+      CurrentMessage = MessageContainer.MessageType.RequestSnapshot;
+      Job.Stop();
+    }
+
+    private byte[] SerializeJobObject() {
+      return PersistenceManager.SaveToGZip(Job);
+    }
+
+    private void RestoreJobObject(byte[] sjob) {
+      Job = (IJob)PersistenceManager.RestoreFromGZip(sjob);
+    }
+
+    public Executor() {
+      CurrentMessage = MessageContainer.MessageType.NoMessage;
+      JobIsFinished = false;
+      Job = new TestJob();
+    }
+
+    #region IDisposable Members
+
+    public void Dispose() {
+      Job.JobFailed -= new EventHandler(Job_JobFailed);
+      Job.JobFailed -= new EventHandler(Job_JobStopped);
+      Queue = null;
+      Job = null;
+    }
+
+    #endregion
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/HeuristicLab.Hive.Client.ExecutionEngine-3.3.csproj
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/HeuristicLab.Hive.Client.ExecutionEngine-3.3.csproj	(revision 4073)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/HeuristicLab.Hive.Client.ExecutionEngine-3.3.csproj	(revision 4073)
@@ -0,0 +1,143 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{1605256A-1CB3-44AB-AAFF-577093EE5789}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Hive.Client.ExecutionEngine</RootNamespace>
+    <AssemblyName>HeuristicLab.Hive.Client.ExecutionEngine-3.2</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Executor.cs" />
+    <Compile Include="ExecutionEnginePlugin.cs" />
+    <Compile Include="InvalidStateException.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
+      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
+      <Name>HeuristicLab.Core-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Hive.Client.Common\3.3\HeuristicLab.Hive.Client.Common-3.3.csproj">
+      <Project>{89F4BC52-C174-481E-9BD2-3814171020E8}</Project>
+      <Name>HeuristicLab.Hive.Client.Common-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Hive.Client.Communication\3.3\HeuristicLab.Hive.Client.Communication-3.3.csproj">
+      <Project>{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}</Project>
+      <Name>HeuristicLab.Hive.Client.Communication-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Hive.Contracts\3.2\HeuristicLab.Hive.Contracts-3.2.csproj">
+      <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
+      <Name>HeuristicLab.Hive.Contracts-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Hive.JobBase\3.2\HeuristicLab.Hive.JobBase-3.2.csproj">
+      <Project>{21187322-52DD-4243-80A4-A85F0263E63B}</Project>
+      <Name>HeuristicLab.Hive.JobBase-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/InvalidStateException.cs
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/InvalidStateException.cs	(revision 4073)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/InvalidStateException.cs	(revision 4073)
@@ -0,0 +1,24 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.Hive.Client.ExecutionEngine {
+  [global::System.Serializable]
+  public class InvalidStateException : Exception {
+    //
+    // For guidelines regarding the creation of new exception types, see
+    //    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
+    // and
+    //    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
+    //
+
+    public InvalidStateException() { }
+    public InvalidStateException(string message) : base(message) { }
+    public InvalidStateException(string message, Exception inner) : base(message, inner) { }
+    protected InvalidStateException(
+    System.Runtime.Serialization.SerializationInfo info,
+    System.Runtime.Serialization.StreamingContext context)
+      : base(info, context) { }
+  }
+}
Index: branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Properties/AssemblyInfo.frame
===================================================================
--- branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Properties/AssemblyInfo.frame	(revision 4073)
+++ branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/Properties/AssemblyInfo.frame	(revision 4073)
@@ -0,0 +1,61 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+using System.Security;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Hive.Client.ExecutionEngine")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: AllowPartiallyTrustedCallers]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("B6BA196A-F2E3-4de2-AE8A-02D4995F8B57")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
