Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockHiveService.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockHiveService.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockHiveService.cs	(revision 6000)
@@ -266,4 +266,10 @@
     }
 
+    public Plugin GetPlugin(Guid pluginId) {
+      if (plugins == null)
+        plugins = ReadPluginsFromServerCache();
+      return plugins.SingleOrDefault(x => x.Id == pluginId);
+    }
+
     public List<Plugin> GetPlugins() {
       if (plugins == null)
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/ExperimentManagerClient.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/ExperimentManagerClient.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/ExperimentManagerClient.cs	(revision 6000)
@@ -50,6 +50,6 @@
     }
 
-    private IEnumerable<Plugin> onlinePlugins;
-    public IEnumerable<Plugin> OnlinePlugins {
+    private List<Plugin> onlinePlugins;
+    public List<Plugin> OnlinePlugins {
       get { return onlinePlugins; }
       set { onlinePlugins = value; }
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/PluginUtil.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/PluginUtil.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/PluginUtil.cs	(revision 6000)
@@ -24,4 +24,5 @@
 using System.IO;
 using System.Linq;
+using System.ServiceModel;
 using HeuristicLab.PluginInfrastructure;
 
@@ -38,16 +39,21 @@
     /// <param name="useLocalPlugins">If true, the plugins which are already online are ignored. All local plugins are uploaded, but only once.</param>
     /// <returns></returns>
-    public static List<Guid> GetPluginDependencies(IHiveService service, IEnumerable<Plugin> onlinePlugins, List<Plugin> alreadyUploadedPlugins, IEnumerable<IPluginDescription> neededPlugins, bool useLocalPlugins) {
+    public static List<Guid> GetPluginDependencies(IHiveService service, List<Plugin> onlinePlugins, List<Plugin> alreadyUploadedPlugins, IEnumerable<IPluginDescription> neededPlugins, bool useLocalPlugins) {
       var pluginIds = new List<Guid>();
       foreach (var neededPlugin in neededPlugins) {
-        Plugin foundPlugin = alreadyUploadedPlugins.SingleOrDefault(p => p.Name == neededPlugin.Name && p.Version == neededPlugin.Version);
+        Plugin foundPlugin = alreadyUploadedPlugins.FirstOrDefault(p => p.Name == neededPlugin.Name && p.Version == neededPlugin.Version);
         if (foundPlugin == null) {
-          foundPlugin = onlinePlugins.SingleOrDefault(p => p.Name == neededPlugin.Name && p.Version == neededPlugin.Version);
+          foundPlugin = onlinePlugins.FirstOrDefault(p => p.Name == neededPlugin.Name && p.Version == neededPlugin.Version);
           if (useLocalPlugins || foundPlugin == null) {
             Plugin p = CreatePlugin(neededPlugin, useLocalPlugins);
             List<PluginData> pd = CreatePluginDatas(neededPlugin);
-            p.Id = service.AddPlugin(p, pd);
-            alreadyUploadedPlugins.Add(p);
-            pluginIds.Add(p.Id);
+            try {
+              p.Id = service.AddPlugin(p, pd);
+              alreadyUploadedPlugins.Add(p);
+              pluginIds.Add(p.Id);
+            }
+            catch (FaultException<PluginAlreadyExistsFault> fault) {
+              onlinePlugins.Add(service.GetPlugin(fault.Detail.Id));
+            }
           } else {
             pluginIds.Add(foundPlugin.Id);
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveServiceClient.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveServiceClient.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveServiceClient.cs	(revision 6000)
@@ -1673,4 +1673,58 @@
     }
     
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
+    [System.Runtime.Serialization.DataContractAttribute(Name="PluginAlreadyExistsFault", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common")]
+    [System.SerializableAttribute()]
+    public partial class PluginAlreadyExistsFault : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
+    {
+        
+        [System.NonSerializedAttribute()]
+        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
+        
+        [System.Runtime.Serialization.OptionalFieldAttribute()]
+        private System.Guid IdField;
+        
+        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
+        {
+            get
+            {
+                return this.extensionDataField;
+            }
+            set
+            {
+                this.extensionDataField = value;
+            }
+        }
+        
+        [System.Runtime.Serialization.DataMemberAttribute()]
+        public System.Guid Id
+        {
+            get
+            {
+                return this.IdField;
+            }
+            set
+            {
+                if ((this.IdField.Equals(value) != true))
+                {
+                    this.IdField = value;
+                    this.RaisePropertyChanged("Id");
+                }
+            }
+        }
+        
+        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
+        
+        protected void RaisePropertyChanged(string propertyName)
+        {
+            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
+            if ((propertyChanged != null))
+            {
+                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
+            }
+        }
+    }
+    
     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
     [System.ServiceModel.ServiceContractAttribute(ConfigurationName="HeuristicLab.Clients.Hive.IHiveService")]
@@ -1678,4 +1732,7 @@
     {
         
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddAppointment", ReplyAction="http://tempuri.org/IHiveService/AddAppointmentResponse")]
+        System.Guid AddAppointment(HeuristicLab.Clients.Hive.Appointment appointment);
+        
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteAppointment", ReplyAction="http://tempuri.org/IHiveService/DeleteAppointmentResponse")]
         void DeleteAppointment(System.Guid appointmentId);
@@ -1759,5 +1816,9 @@
         System.Collections.Generic.List<HeuristicLab.Clients.Hive.MessageContainer> Heartbeat([System.ServiceModel.MessageParameterAttribute(Name="heartbeat")] HeuristicLab.Clients.Hive.Heartbeat heartbeat1);
         
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetPlugin", ReplyAction="http://tempuri.org/IHiveService/GetPluginResponse")]
+        HeuristicLab.Clients.Hive.Plugin GetPlugin(System.Guid pluginId);
+        
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddPlugin", ReplyAction="http://tempuri.org/IHiveService/AddPluginResponse")]
+        [System.ServiceModel.FaultContractAttribute(typeof(HeuristicLab.Clients.Hive.PluginAlreadyExistsFault), Action="http://tempuri.org/IHiveService/AddPluginPluginAlreadyExistsFaultFault", Name="PluginAlreadyExistsFault", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common")]
         System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData);
         
@@ -1809,7 +1870,4 @@
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/TriggerLifecycle", ReplyAction="http://tempuri.org/IHiveService/TriggerLifecycleResponse")]
         void TriggerLifecycle(bool force);
-        
-        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddAppointment", ReplyAction="http://tempuri.org/IHiveService/AddAppointmentResponse")]
-        System.Guid AddAppointment(HeuristicLab.Clients.Hive.Appointment appointment);
     }
     
@@ -1848,4 +1906,9 @@
         }
         
+        public System.Guid AddAppointment(HeuristicLab.Clients.Hive.Appointment appointment)
+        {
+            return base.Channel.AddAppointment(appointment);
+        }
+        
         public void DeleteAppointment(System.Guid appointmentId)
         {
@@ -1983,4 +2046,9 @@
         }
         
+        public HeuristicLab.Clients.Hive.Plugin GetPlugin(System.Guid pluginId)
+        {
+            return base.Channel.GetPlugin(pluginId);
+        }
+        
         public System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData)
         {
@@ -2067,9 +2135,4 @@
             base.Channel.TriggerLifecycle(force);
         }
-        
-        public System.Guid AddAppointment(HeuristicLab.Clients.Hive.Appointment appointment)
-        {
-            return base.Channel.AddAppointment(appointment);
-        }
     }
 }
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Plugin.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Plugin.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Plugin.cs	(revision 6000)
@@ -39,4 +39,8 @@
       return new Plugin(this, cloner);
     }
+
+    public override string ToString() {
+      return string.Format("{0}-{1}", this.Name, this.Version.ToString()) + (this.IsLocal ? ", Local" : string.Empty);
+    }
   }
 }
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Hive 3.4.sln
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Hive 3.4.sln	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Hive 3.4.sln	(revision 6000)
@@ -34,5 +34,5 @@
 	ProjectSection(WebsiteProperties) = preProject
 		TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
-		ProjectReferences = "{CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}|HeuristicLab.Services.Hive-3.4.dll;{14424A16-48D4-445E-80BF-DDF617548BBB}|HeuristicLab.Services.Hive.Common-3.4.dll;{EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}|HeuristicLab.Services.Hive.DataAccess-3.4.dll;"
+		ProjectReferences = "{CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}|HeuristicLab.Services.Hive-3.4.dll;{14424A16-48D4-445E-80BF-DDF617548BBB}|HeuristicLab.Services.Hive.Common-3.4.dll;{EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}|HeuristicLab.Services.Hive.DataAccess-3.4.dll;{F98A1740-9AC9-4D36-A582-6A2D0D06978D}|HeuristicLab.Hive-3.4.dll;"
 		Debug.AspNetCompiler.VirtualPath = "/Hive-3.4"
 		Debug.AspNetCompiler.PhysicalPath = "HeuristicLab.Services.Hive.Web\Hive-3.4\"
@@ -92,4 +92,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.HiveEngine-3.4", "HeuristicLab.HiveEngine\3.4\HeuristicLab.HiveEngine-3.4.csproj", "{2C036542-5451-4A23-AFF6-87575C7BAFE7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.HiveEngine.Test", "HeuristicLab.HiveEngine.Test\HeuristicLab.HiveEngine.Test.csproj", "{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}"
 EndProject
 Global
@@ -386,4 +388,17 @@
 		{2C036542-5451-4A23-AFF6-87575C7BAFE7}.Release|x86.ActiveCfg = Release|x86
 		{2C036542-5451-4A23-AFF6-87575C7BAFE7}.Release|x86.Build.0 = Release|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Debug|x64.ActiveCfg = Debug|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Debug|x86.ActiveCfg = Debug|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Debug|x86.Build.0 = Debug|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Release|Any CPU.ActiveCfg = Release|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Release|Mixed Platforms.Build.0 = Release|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Release|x64.ActiveCfg = Release|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Release|x86.ActiveCfg = Release|x86
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
@@ -413,4 +428,5 @@
 		{A0EB9657-4D57-4CC1-A309-EC010D7F9EAB} = {9963403B-3CB9-48E0-9FEB-B1CE12C31601}
 		{2C036542-5451-4A23-AFF6-87575C7BAFE7} = {4596C5BB-CAB1-4C01-891F-4890F9F16CF8}
+		{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5} = {4596C5BB-CAB1-4C01-891F-4890F9F16CF8}
 	EndGlobalSection
 EndGlobal
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/HeuristicLab.HiveEngine.Test.csproj
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/HeuristicLab.HiveEngine.Test.csproj	(revision 6000)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/HeuristicLab.HiveEngine.Test.csproj	(revision 6000)
@@ -0,0 +1,138 @@
+﻿<?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)' == '' ">x86</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{87D9FBB9-8E54-4770-9C84-B4B571D9EDD5}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.HiveEngine.Test</RootNamespace>
+    <AssemblyName>HeuristicLab.HiveEngine.Test</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.HiveEngine.Test.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.HiveEngine.Test.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common.Resources-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Data-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Operators-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.TestFunctions-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Problems.TestFunctions-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.SequentialEngine-3.3">
+      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Clients.Hive\3.4\HeuristicLab.Clients.Hive-3.4.csproj">
+      <Project>{B5EF1E5A-9F3D-40B9-B4B0-30AADF2E2CEB}</Project>
+      <Name>HeuristicLab.Clients.Hive-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.HiveEngine\3.4\HeuristicLab.HiveEngine-3.4.csproj">
+      <Project>{2C036542-5451-4A23-AFF6-87575C7BAFE7}</Project>
+      <Name>HeuristicLab.HiveEngine-3.4</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="app.config" />
+  </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>
+  -->
+</Project>
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/Program.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/Program.cs	(revision 6000)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/Program.cs	(revision 6000)
@@ -0,0 +1,63 @@
+﻿using System;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Threading;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Clients.Hive;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.PluginInfrastructure.Manager;
+using HeuristicLab.Problems.TestFunctions;
+
+namespace HeuristicLab.HiveEngine.Test {
+  public class Program {
+    static void Main(string[] args) {
+      PluginManager pm = new PluginManager(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
+      pm.DiscoverAndCheckPlugins();
+      pm.Run(pm.Applications.Where(x => x.Name == "HeuristicLab.HiveEngine.Test").SingleOrDefault());
+    }
+  }
+
+  [Plugin("HeuristicLab.HiveEngine.Test", "1.0.0.0")]
+  [PluginFile("HeuristicLab.HiveEngine.Test.exe", PluginFileType.Assembly)]
+  public class TestPlugin : PluginBase { }
+
+  [Application("HeuristicLab.HiveEngine.Test")]
+  public class TestApp : ApplicationBase {
+
+    public override void Run() {
+      ContentManager.Initialize(new PersistenceContentManager());
+
+      #region Credentials
+      ServiceLocator.Instance.Username = "cneumuel";
+      ServiceLocator.Instance.Password = "Stormlord105.";
+      #endregion
+
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+      ga.Problem = new SingleObjectiveTestFunctionProblem();
+      ga.Engine = new HiveEngine();      
+      ga.PopulationSize.Value = 3;
+      ga.MaximumGenerations.Value = 3;
+
+      ga.Start();
+
+      while (ga.ExecutionState != Core.ExecutionState.Stopped && ga.ExecutionState != Core.ExecutionState.Paused) {
+        Thread.Sleep(2000);
+        Console.Clear();
+        Console.WriteLine(string.Join(Environment.NewLine, ga.Results.Select(x => x.ToString()).ToArray()));
+        Console.WriteLine("---");
+        Console.WriteLine("Log:");
+        Console.WriteLine(string.Join(Environment.NewLine, ga.Engine.Log.Messages.ToArray()));
+      }
+      Console.WriteLine("finished: " + ga.ExecutionState);
+
+      Console.WriteLine("Storing...");
+      ContentManager.Save((IStorableContent)ga, string.Format("result_{0}.hl", DateTime.Now.ToString("yy.MM.dd HH;mm;ss")), true);
+      Console.WriteLine("Finished");
+
+      Console.ReadLine();
+    }
+  }
+}
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/Properties/AssemblyInfo.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/Properties/AssemblyInfo.cs	(revision 6000)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/Properties/AssemblyInfo.cs	(revision 6000)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 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.HiveEngine.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("HeuristicLab.HiveEngine.Test")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 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("a36ff59b-606b-4b21-bcbb-8f7b8dcc910e")]
+
+// 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("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/app.config
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/app.config	(revision 6000)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine.Test/app.config	(revision 6000)
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <configSections>
+    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+      <section name="HeuristicLab.PluginInfrastructure.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+      <section name="HeuristicLab.Optimizer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+      <section name="HeuristicLab.Persistence.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+    </sectionGroup>
+  </configSections>
+  <connectionStrings>
+    <add name="HeuristicLab.Services.Hive.DataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString" connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=True;" providerName="System.Data.SqlClient" />
+  </connectionStrings>
+  <!-- [chn] TODO: system.web should be located in HeuristicLab.Hive.Server.Core/app.config, but the ConfigMerger does not merge system.web (yet) -->
+  <system.web>
+    <membership>
+      <providers>
+        <clear />
+        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="HeuristicLab.Authentication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="HeuristicLab.Authentication" />
+      </providers>
+    </membership>
+    <roleManager enabled="true">
+      <providers>
+        <clear />
+        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication" />
+      </providers>
+    </roleManager>
+  </system.web>
+  <system.serviceModel>
+    <behaviors>
+      <endpointBehaviors>
+        <behavior name="SerializationBehavior">
+          <dataContractSerializer maxItemsInObjectGraph="1000000" />
+        </behavior>
+      </endpointBehaviors>
+    </behaviors>
+    <bindings>
+      <wsHttpBinding>
+        <binding name="WSHttpBinding_IUpdate" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="200000000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
+          <readerQuotas maxDepth="32" maxStringContentLength="32000" maxArrayLength="200000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
+          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
+          <security mode="Message">
+            <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
+            <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
+          </security>
+        </binding>
+        <binding name="WSHttpBinding_IAdmin" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="200000000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
+          <readerQuotas maxDepth="32" maxStringContentLength="32000" maxArrayLength="200000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
+          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
+          <security mode="Message">
+            <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
+            <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
+          </security>
+        </binding>
+        <binding name="wsHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
+          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
+          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
+          <security mode="Message">
+            <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
+            <message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default" />
+          </security>
+        </binding>
+      </wsHttpBinding>
+    </bindings>
+    <client>
+      <endpoint address="http://services.heuristiclab.com/Deployment-3.3/Update.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdate" contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdate" name="WSHttpBinding_IUpdate">
+        <identity>
+          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
+        </identity>
+      </endpoint>
+      <endpoint address="http://services.heuristiclab.com/Deployment-3.3/Admin.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IAdmin" contract="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdmin" name="WSHttpBinding_IAdmin">
+        <identity>
+          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
+        </identity>
+      </endpoint>
+      <endpoint address="http://services.heuristiclab.com/Hive-3.4/HiveService.svc" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding" contract="HeuristicLab.Clients.Hive.IHiveService" name="wsHttpBinding_IHiveService">
+        <identity>
+          <certificate encodedValue="AwAAAAEAAAAUAAAAwK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ==" />
+        </identity>
+      </endpoint>
+    </client>
+  </system.serviceModel>
+  <runtime>
+    <gcServer enabled="true" />
+  </runtime>
+  <system.data>
+    <DbProviderFactories>
+      <remove invariant="System.Data.SQLite" />
+      <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+      <remove invariant="System.Data.SqlServerCe.3.5" />
+      <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
+    </DbProviderFactories>
+  </system.data>
+  <userSettings>
+    <HeuristicLab.PluginInfrastructure.Properties.Settings>
+      <setting name="UpdateLocation" serializeAs="String">
+        <value>http://services.heuristiclab.com/Deployment-3.3/Update.svc</value>
+      </setting>
+      <setting name="UpdateLocationUserName" serializeAs="String">
+        <value>anonymous</value>
+      </setting>
+      <setting name="UpdateLocationPassword" serializeAs="String">
+        <value>GetTheLab!</value>
+      </setting>
+      <setting name="UpdateLocationAdministrationAddress" serializeAs="String">
+        <value>http://services.heuristiclab.com/Deployment-3.3/Admin.svc</value>
+      </setting>
+      <setting name="ShowPluginUploadControls" serializeAs="String">
+        <value>False</value>
+      </setting>
+    </HeuristicLab.PluginInfrastructure.Properties.Settings>
+    <HeuristicLab.Optimizer.Properties.Settings>
+      <setting name="ShowStartPage" serializeAs="String">
+        <value>True</value>
+      </setting>
+      <setting name="ShowOperatorsSidebar" serializeAs="String">
+        <value>False</value>
+      </setting>
+      <setting name="ShowClipboard" serializeAs="String">
+        <value>True</value>
+      </setting>
+      <setting name="ShowMaximized" serializeAs="String">
+        <value>True</value>
+      </setting>
+      <setting name="CollapseClipboard" serializeAs="String">
+        <value>True</value>
+      </setting>
+      <setting name="CollapseOperatorsSidebar" serializeAs="String">
+        <value>False</value>
+      </setting>
+    </HeuristicLab.Optimizer.Properties.Settings>
+    <HeuristicLab.Persistence.Properties.Settings>
+      <setting name="CustomConfigurations" serializeAs="String">
+        <value />
+      </setting>
+      <setting name="CustomConfigurationsTypeCache" serializeAs="String">
+        <value />
+      </setting>
+    </HeuristicLab.Persistence.Properties.Settings>
+  </userSettings>
+</configuration>
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/EngineJob.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/EngineJob.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/EngineJob.cs	(revision 6000)
@@ -33,5 +33,4 @@
       this.initialOperation = initialOperation;
       this.engine = engine;
-      this.engine.Prepare(initialOperation);
       RegisterEngineEvents();
     }
@@ -42,4 +41,5 @@
       : base(original, cloner) {
       this.engine = cloner.Clone(original.engine);
+      this.initialOperation = cloner.Clone(original.initialOperation);
       RegisterEngineEvents();
     }
@@ -60,9 +60,10 @@
 
     public override void Start() {
+      engine.Prepare(initialOperation);
       engine.Start();
     }
     
     public override void Pause() {
-      throw new NotImplementedException();
+      engine.Pause();
     }
 
@@ -80,9 +81,9 @@
     }
 
-    void engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+    private void engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {
       OnJobFailed(e);
     }
 
-    void engine_Stopped(object sender, EventArgs e) {
+    private void engine_Stopped(object sender, EventArgs e) {
       OnJobStopped();
     }
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/HeuristicLabHiveEnginePlugin.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/HeuristicLabHiveEnginePlugin.cs	(revision 6000)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/HeuristicLabHiveEnginePlugin.cs	(revision 6000)
@@ -0,0 +1,40 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.HiveEngine {
+  [Plugin("HeuristicLab.HiveEngine", "3.4.0.5958")]
+  [PluginFile("HeuristicLab.HiveEngine-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Clients.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.DataAccess", "3.3")]
+  [PluginDependency("HeuristicLab.Hive.Contracts", "3.3")]
+  [PluginDependency("HeuristicLab.Hive.ExperimentManager", "3.3")]
+  [PluginDependency("HeuristicLab.Hive.JobBase", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.SequentialEngine", "3.3")]
+  public class HeuristicLabHiveEnginePlugin : PluginBase {
+  }
+}
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/HiveEngine.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/HiveEngine.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/HiveEngine.cs	(revision 6000)
@@ -46,10 +46,10 @@
     }
 
-    private IEnumerable<Plugin> onlinePlugins;
-    public IEnumerable<Plugin> OnlinePlugins {
+    private List<Plugin> onlinePlugins;
+    public List<Plugin> OnlinePlugins {
       get { return onlinePlugins; }
       set { onlinePlugins = value; }
     }
-    
+
     private List<Plugin> alreadyUploadedPlugins;
     public List<Plugin> AlreadyUploadedPlugins {
@@ -102,5 +102,5 @@
       TaskScheduler.UnobservedTaskException += new EventHandler<UnobservedTaskExceptionEventArgs>(TaskScheduler_UnobservedTaskException);
 
-      this.OnlinePlugins = ServiceLocator.Instance.CallHiveService(s => s.GetPlugins());
+      this.OnlinePlugins = ServiceLocator.Instance.CallHiveService(s => s.GetPlugins()).Where(x => x.IsLocal == false).ToList();
       this.AlreadyUploadedPlugins = new List<Plugin>();
 
@@ -123,5 +123,6 @@
 
             IScope[] scopes = ExecuteOnHive(jobs, parentScopeClone, cancellationToken);
-
+            //IScope[] scopes = ExecuteLocally(jobs, parentScopeClone, cancellationToken);
+            
             for (int i = 0; i < coll.Count; i++) {
               if (coll[i] is IAtomicOperation) {
@@ -183,4 +184,19 @@
       target.SubScopes.AddRange(source.SubScopes);
       // TODO: validate if parent scopes match - otherwise source is invalid
+    }
+
+    private IScope[] ExecuteLocally(EngineJob[] jobs, IScope parentScopeClone, CancellationToken cancellationToken) {
+      IScope[] scopes = new Scope[jobs.Length];
+
+      for (int i = 0; i < jobs.Length; i++) {
+        var job = (EngineJob)jobs[i].Clone();
+        job.Start();
+        while (job.ExecutionState != ExecutionState.Stopped) {
+          Thread.Sleep(100);
+        }
+        scopes[i] = ((IAtomicOperation)job.InitialOperation).Scope;
+      }
+
+      return scopes;
     }
 
@@ -444,17 +460,11 @@
     /// </summary>
     private static void TryAndRepeat(Action action, int repetitions, string errorMessage) {
-      while (repetitions > 0) {
-        try { action(); }
-        catch (Exception e) {
-          repetitions--;
-          if (repetitions == 0) {
-            throw new HiveEngineException(errorMessage, e);
-          }
-        }
-      }
-    }
-
-    private static void TryAndRepeat(Action action) {
-      TryAndRepeat(action, -1, string.Empty);
+      try { action(); }
+      catch (Exception e) {
+        repetitions--;
+        if (repetitions <= 0)
+          throw new HiveEngineException(errorMessage, e);
+        TryAndRepeat(action, repetitions, errorMessage);
+      }
     }
   }
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/Properties/AssemblyInfo.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/Properties/AssemblyInfo.cs	(revision 6000)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/Properties/AssemblyInfo.cs	(revision 6000)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 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.HiveEngine-3.4")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HEAL")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2011 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 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("7c14407e-6980-465b-ba3a-4a916d48989b")]
+
+// 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.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.0")]
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj	(revision 6000)
@@ -95,4 +95,5 @@
   <ItemGroup>
     <Compile Include="ApplicationConstants.cs" />
+    <Compile Include="ServiceFaults\PluginAlreadyExistsFault.cs" />
     <None Include="HeuristicLabServicesHiveCommonPlugin.cs.frame" />
     <Compile Include="DataTransfer\Appointment.cs" />
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceContracts/IHiveService.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceContracts/IHiveService.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceContracts/IHiveService.cs	(revision 6000)
@@ -101,4 +101,7 @@
     #region Plugin Methods
     [OperationContract]
+    Plugin GetPlugin(Guid pluginId);
+    [OperationContract]
+    [FaultContract(typeof(PluginAlreadyExistsFault))]
     Guid AddPlugin(Plugin plugin, List<PluginData> pluginData);
     [OperationContract]
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceFaults/PluginAlreadyExistsFault.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceFaults/PluginAlreadyExistsFault.cs	(revision 6000)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceFaults/PluginAlreadyExistsFault.cs	(revision 6000)
@@ -0,0 +1,40 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Runtime.Serialization;
+
+namespace HeuristicLab.Services.Hive.Common {
+  [DataContract]
+  public class PluginAlreadyExistsFault {
+    
+    private Guid id;
+    [DataMember]
+    public Guid Id {
+      get { return id; }
+      set { id = value; }
+    }
+
+    public PluginAlreadyExistsFault(Guid id) {
+      this.id = id;
+    }
+  }
+}
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveRoles.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveRoles.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveRoles.cs	(revision 6000)
@@ -25,5 +25,5 @@
     public const string Administrator = "Hive Administrator";
     public const string Slave = "Hive Slave";
-    public const string Client = "Hive Client";
+    public const string Client = "Hive User";
   }
 }
Index: /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
===================================================================
--- /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs	(revision 5999)
+++ /branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs	(revision 6000)
@@ -250,5 +250,25 @@
           dao.AddSlave(slaveInfo);
         } else {
-          dao.UpdateSlave(slaveInfo);
+          var dbSlave = dao.GetSlave(slaveInfo.Id);
+
+          dbSlave.Name = slaveInfo.Name;
+          dbSlave.Description = slaveInfo.Description;
+
+          dbSlave.Cores = slaveInfo.Cores;
+          dbSlave.CpuArchitecture = slaveInfo.CpuArchitecture;
+          dbSlave.CpuSpeed = slaveInfo.CpuSpeed;
+          dbSlave.FreeCores = slaveInfo.FreeCores;
+          dbSlave.FreeMemory = slaveInfo.FreeMemory;
+          dbSlave.Memory = slaveInfo.Memory;
+          dbSlave.OperatingSystem = slaveInfo.OperatingSystem;
+          
+          dbSlave.LastHeartbeat = DateTime.Now;          
+          dbSlave.SlaveState = SlaveState.Idle;
+
+          // don't update those properties:
+          // dbSlave.IsAllowedToCalculate = slaveInfo.IsAllowedToCalculate; 
+          // dbSlave.ParentResourceId = slaveInfo.ParentResourceId;
+
+          dao.UpdateSlave(dbSlave);
         }
       });
@@ -282,4 +302,11 @@
         plugin.UserId = auth.UserId;
         plugin.DateCreated = DateTime.Now;
+        if (!plugin.IsLocal) {
+          var existing = dao.GetPlugins(x => x.Name == plugin.Name && x.Version == plugin.Version.ToString() && !x.IsLocal);
+          if (existing.Count() > 0) {
+            // a plugin with the same name and version already exists.
+            throw new FaultException<PluginAlreadyExistsFault>(new PluginAlreadyExistsFault(existing.Single().Id));
+          }
+        }
         Guid pluginId = dao.AddPlugin(plugin);
         foreach (PluginData pluginData in pluginDatas) {
@@ -289,4 +316,11 @@
         return pluginId;
       });
+    }
+
+    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
+    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
+    [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
+    public Plugin GetPlugin(Guid pluginId) {
+      return dao.GetPlugin(pluginId);
     }
 
