Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln	(revision 4092)
@@ -8,4 +8,5 @@
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Hive-3.3", "HeuristicLab.Hive\3.3\HeuristicLab.Hive-3.3.csproj", "{C92AAC8C-4D88-449C-ABA5-2B935D769842}"
 	ProjectSection(ProjectDependencies) = postProject
+		{55B89815-F3E7-4D09-9442-273F849141DD} = {55B89815-F3E7-4D09-9442-273F849141DD}
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84} = {4D5A2A16-66C2-431D-9AA3-BD3041E64B84}
 		{21187322-52DD-4243-80A4-A85F0263E63B} = {21187322-52DD-4243-80A4-A85F0263E63B}
@@ -82,10 +83,16 @@
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SpringNET-1.3.0", "HeuristicLab.ExtLibs\HeuristicLab.SpringNET\1.3.0\HeuristicLab.SpringNET-1.3.0.csproj", "{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HeuristicLab.Hive.Test", "HeuristicLab.Hive.Test", "{4F2D8149-D608-42B3-BB1C-6909BDA2B350}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Hive.Server.Tests", "HeuristicLab.Hive.Server.Tests\HeuristicLab.Hive.Server.Tests.csproj", "{55B89815-F3E7-4D09-9442-273F849141DD}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
+		Debug|Mixed Platforms = Debug|Mixed Platforms
 		Debug|x64 = Debug|x64
 		Debug|x86 = Debug|x86
 		Release|Any CPU = Release|Any CPU
+		Release|Mixed Platforms = Release|Mixed Platforms
 		Release|x64 = Release|x64
 		Release|x86 = Release|x86
@@ -94,4 +101,5 @@
 		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
 		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Debug|x64.ActiveCfg = Debug|x64
 		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Debug|x64.Build.0 = Debug|x64
@@ -100,4 +108,5 @@
 		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Release|Mixed Platforms.ActiveCfg = Release|x86
 		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Release|x64.ActiveCfg = Release|x64
 		{5010BD86-23B7-4F8C-888A-76D21AD5266A}.Release|x64.Build.0 = Release|x64
@@ -106,4 +115,6 @@
 		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Debug|x64.ActiveCfg = Debug|x64
 		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Debug|x64.Build.0 = Debug|x64
@@ -112,4 +123,6 @@
 		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Release|Mixed Platforms.Build.0 = Release|x64
 		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Release|x64.ActiveCfg = Release|x64
 		{898B31CF-81DC-453B-AEB3-BDF83197A7EE}.Release|x64.Build.0 = Release|x64
@@ -118,12 +131,18 @@
 		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
 		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Debug|x64.ActiveCfg = Debug|Any CPU
 		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Release|x64.ActiveCfg = Release|Any CPU
 		{C92AAC8C-4D88-449C-ABA5-2B935D769842}.Release|x86.ActiveCfg = Release|Any CPU
 		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Debug|x64.ActiveCfg = Debug|x64
 		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Debug|x64.Build.0 = Debug|x64
@@ -132,4 +151,6 @@
 		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Release|Mixed Platforms.Build.0 = Release|x64
 		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Release|x64.ActiveCfg = Release|x64
 		{D59E852C-F205-4647-8C05-EB9ED1CF44E9}.Release|x64.Build.0 = Release|x64
@@ -138,4 +159,6 @@
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Debug|x64.ActiveCfg = Debug|x64
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Debug|x64.Build.0 = Debug|x64
@@ -144,4 +167,6 @@
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Release|Mixed Platforms.Build.0 = Release|x64
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Release|x64.ActiveCfg = Release|x64
 		{CE2DFB48-6A9C-4507-96C6-5FC40E92035C}.Release|x64.Build.0 = Release|x64
@@ -150,4 +175,6 @@
 		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Debug|x64.ActiveCfg = Debug|x64
 		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Debug|x64.Build.0 = Debug|x64
@@ -156,4 +183,6 @@
 		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Release|Mixed Platforms.Build.0 = Release|x64
 		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Release|x64.ActiveCfg = Release|x64
 		{AC3D84FF-F0D7-43F0-9C99-9F8DBE087E2C}.Release|x64.Build.0 = Release|x64
@@ -162,4 +191,5 @@
 		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
 		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Debug|x64.ActiveCfg = Debug|x64
 		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Debug|x64.Build.0 = Debug|x64
@@ -168,4 +198,5 @@
 		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Release|Mixed Platforms.ActiveCfg = Release|x86
 		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Release|x64.ActiveCfg = Release|x64
 		{E3288D4B-7A51-499A-AC5B-019319CE51DC}.Release|x64.Build.0 = Release|x64
@@ -174,4 +205,6 @@
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Debug|x64.ActiveCfg = Debug|x64
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Debug|x64.Build.0 = Debug|x64
@@ -180,4 +213,6 @@
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Release|Mixed Platforms.Build.0 = Release|x64
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Release|x64.ActiveCfg = Release|x64
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B}.Release|x64.Build.0 = Release|x64
@@ -186,4 +221,5 @@
 		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
 		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Debug|x64.ActiveCfg = Debug|x64
 		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Debug|x64.Build.0 = Debug|x64
@@ -192,4 +228,5 @@
 		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Release|Mixed Platforms.ActiveCfg = Release|x86
 		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Release|x64.ActiveCfg = Release|x64
 		{AEB51212-CDBA-4FC6-A2EE-02359AA53ECE}.Release|x64.Build.0 = Release|x64
@@ -198,4 +235,5 @@
 		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
 		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|x64.ActiveCfg = Debug|x64
 		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Debug|x64.Build.0 = Debug|x64
@@ -204,4 +242,5 @@
 		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Release|Mixed Platforms.ActiveCfg = Release|x86
 		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Release|x64.ActiveCfg = Release|x64
 		{8B14A35E-DBDF-43EB-B019-23E9FBC5A35E}.Release|x64.Build.0 = Release|x64
@@ -210,4 +249,5 @@
 		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
 		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Debug|x64.ActiveCfg = Debug|x64
 		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Debug|x64.Build.0 = Debug|x64
@@ -216,4 +256,5 @@
 		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Release|Any CPU.Build.0 = Release|Any CPU
+		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Release|Mixed Platforms.ActiveCfg = Release|x86
 		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Release|x64.ActiveCfg = Release|x64
 		{1605256A-1CB3-44AB-AAFF-577093EE5789}.Release|x64.Build.0 = Release|x64
@@ -222,4 +263,6 @@
 		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Debug|x64.ActiveCfg = Debug|x64
 		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Debug|x64.Build.0 = Debug|x64
@@ -228,4 +271,6 @@
 		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Release|Any CPU.Build.0 = Release|Any CPU
+		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Release|Mixed Platforms.Build.0 = Release|x64
 		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Release|x64.ActiveCfg = Release|x64
 		{134F93D7-E7C8-4ECD-9923-7F63259A60D8}.Release|x64.Build.0 = Release|x64
@@ -234,4 +279,6 @@
 		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Debug|x64.ActiveCfg = Debug|x64
 		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Debug|x64.Build.0 = Debug|x64
@@ -240,4 +287,6 @@
 		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Release|Mixed Platforms.Build.0 = Release|x64
 		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Release|x64.ActiveCfg = Release|x64
 		{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}.Release|x64.Build.0 = Release|x64
@@ -246,4 +295,6 @@
 		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Debug|x64.ActiveCfg = Debug|x64
 		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Debug|x64.Build.0 = Debug|x64
@@ -252,4 +303,6 @@
 		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Release|Mixed Platforms.Build.0 = Release|x64
 		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Release|x64.ActiveCfg = Release|x64
 		{A04AE929-D0E1-466D-A9D3-BF3C4B2C209F}.Release|x64.Build.0 = Release|x64
@@ -258,4 +311,5 @@
 		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
 		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Debug|x64.ActiveCfg = Debug|x64
 		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Debug|x64.Build.0 = Debug|x64
@@ -264,4 +318,5 @@
 		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Release|Any CPU.Build.0 = Release|Any CPU
+		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Release|Mixed Platforms.ActiveCfg = Release|x86
 		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Release|x64.ActiveCfg = Release|x64
 		{42A1D075-6C12-4DD9-B0C2-C6F5210A8119}.Release|x64.Build.0 = Release|x64
@@ -270,4 +325,6 @@
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Debug|x64.ActiveCfg = Debug|x64
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Debug|x64.Build.0 = Debug|x64
@@ -276,4 +333,6 @@
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Release|Mixed Platforms.Build.0 = Release|x64
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Release|x64.ActiveCfg = Release|x64
 		{4D5A2A16-66C2-431D-9AA3-BD3041E64B84}.Release|x64.Build.0 = Release|x64
@@ -282,4 +341,6 @@
 		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Debug|x64.ActiveCfg = Debug|x64
 		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Debug|x64.Build.0 = Debug|x64
@@ -288,4 +349,6 @@
 		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Release|Mixed Platforms.Build.0 = Release|x64
 		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Release|x64.ActiveCfg = Release|x64
 		{A4499DDD-D1B8-414F-98F6-903C2C71BEB0}.Release|x64.Build.0 = Release|x64
@@ -294,4 +357,6 @@
 		{679E977A-117B-456E-8594-2A4DEADB658B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{679E977A-117B-456E-8594-2A4DEADB658B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{679E977A-117B-456E-8594-2A4DEADB658B}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{679E977A-117B-456E-8594-2A4DEADB658B}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{679E977A-117B-456E-8594-2A4DEADB658B}.Debug|x64.ActiveCfg = Debug|x64
 		{679E977A-117B-456E-8594-2A4DEADB658B}.Debug|x64.Build.0 = Debug|x64
@@ -300,4 +365,6 @@
 		{679E977A-117B-456E-8594-2A4DEADB658B}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{679E977A-117B-456E-8594-2A4DEADB658B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{679E977A-117B-456E-8594-2A4DEADB658B}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{679E977A-117B-456E-8594-2A4DEADB658B}.Release|Mixed Platforms.Build.0 = Release|x64
 		{679E977A-117B-456E-8594-2A4DEADB658B}.Release|x64.ActiveCfg = Release|x64
 		{679E977A-117B-456E-8594-2A4DEADB658B}.Release|x64.Build.0 = Release|x64
@@ -306,4 +373,6 @@
 		{9076697B-C151-46CD-95BC-1D059492B478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{9076697B-C151-46CD-95BC-1D059492B478}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9076697B-C151-46CD-95BC-1D059492B478}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{9076697B-C151-46CD-95BC-1D059492B478}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{9076697B-C151-46CD-95BC-1D059492B478}.Debug|x64.ActiveCfg = Debug|x64
 		{9076697B-C151-46CD-95BC-1D059492B478}.Debug|x64.Build.0 = Debug|x64
@@ -312,4 +381,6 @@
 		{9076697B-C151-46CD-95BC-1D059492B478}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{9076697B-C151-46CD-95BC-1D059492B478}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9076697B-C151-46CD-95BC-1D059492B478}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{9076697B-C151-46CD-95BC-1D059492B478}.Release|Mixed Platforms.Build.0 = Release|x64
 		{9076697B-C151-46CD-95BC-1D059492B478}.Release|x64.ActiveCfg = Release|x64
 		{9076697B-C151-46CD-95BC-1D059492B478}.Release|x64.Build.0 = Release|x64
@@ -318,4 +389,5 @@
 		{89F4BC52-C174-481E-9BD2-3814171020E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{89F4BC52-C174-481E-9BD2-3814171020E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{89F4BC52-C174-481E-9BD2-3814171020E8}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
 		{89F4BC52-C174-481E-9BD2-3814171020E8}.Debug|x64.ActiveCfg = Debug|x64
 		{89F4BC52-C174-481E-9BD2-3814171020E8}.Debug|x64.Build.0 = Debug|x64
@@ -324,4 +396,5 @@
 		{89F4BC52-C174-481E-9BD2-3814171020E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{89F4BC52-C174-481E-9BD2-3814171020E8}.Release|Any CPU.Build.0 = Release|Any CPU
+		{89F4BC52-C174-481E-9BD2-3814171020E8}.Release|Mixed Platforms.ActiveCfg = Release|x86
 		{89F4BC52-C174-481E-9BD2-3814171020E8}.Release|x64.ActiveCfg = Release|x64
 		{89F4BC52-C174-481E-9BD2-3814171020E8}.Release|x64.Build.0 = Release|x64
@@ -330,4 +403,6 @@
 		{21187322-52DD-4243-80A4-A85F0263E63B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{21187322-52DD-4243-80A4-A85F0263E63B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{21187322-52DD-4243-80A4-A85F0263E63B}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
+		{21187322-52DD-4243-80A4-A85F0263E63B}.Debug|Mixed Platforms.Build.0 = Debug|x64
 		{21187322-52DD-4243-80A4-A85F0263E63B}.Debug|x64.ActiveCfg = Debug|x64
 		{21187322-52DD-4243-80A4-A85F0263E63B}.Debug|x64.Build.0 = Debug|x64
@@ -336,4 +411,6 @@
 		{21187322-52DD-4243-80A4-A85F0263E63B}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{21187322-52DD-4243-80A4-A85F0263E63B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{21187322-52DD-4243-80A4-A85F0263E63B}.Release|Mixed Platforms.ActiveCfg = Release|x64
+		{21187322-52DD-4243-80A4-A85F0263E63B}.Release|Mixed Platforms.Build.0 = Release|x64
 		{21187322-52DD-4243-80A4-A85F0263E63B}.Release|x64.ActiveCfg = Release|x64
 		{21187322-52DD-4243-80A4-A85F0263E63B}.Release|x64.Build.0 = Release|x64
@@ -342,4 +419,6 @@
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Mixed Platforms.Build.0 = Debug|x86
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x64.ActiveCfg = Debug|x64
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x64.Build.0 = Debug|x64
@@ -348,8 +427,23 @@
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Mixed Platforms.Build.0 = Release|x86
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x64.ActiveCfg = Release|x64
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x64.Build.0 = Release|x64
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x86.ActiveCfg = Release|x86
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x86.Build.0 = Release|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Debug|Any CPU.ActiveCfg = Debug|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Debug|Any CPU.Build.0 = Debug|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Debug|x64.ActiveCfg = Debug|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Debug|x86.ActiveCfg = Debug|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Debug|x86.Build.0 = Debug|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Release|Any CPU.ActiveCfg = Release|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Release|Mixed Platforms.Build.0 = Release|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Release|x64.ActiveCfg = Release|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Release|x86.ActiveCfg = Release|x86
+		{55B89815-F3E7-4D09-9442-273F849141DD}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
@@ -379,4 +473,5 @@
 		{5CDACE54-5FB2-4344-A21C-963F63CB7C2B} = {BD1DE6F6-A188-4D1F-9681-BA7104818370}
 		{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1} = {98B4B360-4F14-4BC5-92F2-9B81F6C712DA}
+		{55B89815-F3E7-4D09-9442-273F849141DD} = {4F2D8149-D608-42B3-BB1C-6909BDA2B350}
 	EndGlobalSection
 EndGlobal
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 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ApplicationConstants.cs	(revision 4092)
@@ -31,6 +31,8 @@
     public static System.Data.IsolationLevel ISOLATION_LEVEL = IsolationLevel.ReadUncommitted;
 
-    public static System.Transactions.IsolationLevel ISOLATION_LEVEL_SCOPE =
-      System.Transactions.IsolationLevel.ReadUncommitted;
+    /// <summary>
+    /// ReadUncommitted to minimize deadlocks. 
+    /// </summary>
+    public static System.Transactions.IsolationLevel ISOLATION_LEVEL_SCOPE = System.Transactions.IsolationLevel.ReadUncommitted;
     public static int HEARTBEAT_MAX_DIF = 120; // value in seconds
     public static int JOB_TIME_TO_LIVE = 5;
@@ -87,6 +89,5 @@
     public static string RESPONSE_COMMUNICATOR_JOB_WAS_ABORTED = "Job was aborted";
 
-    public static string RESPONSE_COMMUNICATOR_FETCH_OR_FORCEFETCH_CALENDAR =
-      "new Calendar must be fetched / force fetched";
+    public static string RESPONSE_COMMUNICATOR_FETCH_OR_FORCEFETCH_CALENDAR = "new Calendar must be fetched / force fetched";
 
     public static string RESPONSE_JOB_ALL_JOBS = "Job.AllJobs";
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 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs	(revision 4092)
@@ -40,13 +40,9 @@
   public class ClientCommunicator : IClientCommunicator,
     IInternalClientCommunicator {
-    private static Dictionary<Guid, DateTime> lastHeartbeats =
-      new Dictionary<Guid, DateTime>();
-    private static Dictionary<Guid, int> newAssignedJobs =
-      new Dictionary<Guid, int>();
-    private static Dictionary<Guid, int> pendingJobs =
-      new Dictionary<Guid, int>();
-
-    private static ReaderWriterLockSlim heartbeatLock =
-      new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
+    private static Dictionary<Guid, DateTime> lastHeartbeats = new Dictionary<Guid, DateTime>();
+    private static Dictionary<Guid, int> newAssignedJobs = new Dictionary<Guid, int>();
+    private static Dictionary<Guid, int> pendingJobs = new Dictionary<Guid, int>();
+
+    private static ReaderWriterLockSlim heartbeatLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
 
     //private ISessionFactory factory;
@@ -81,6 +77,6 @@
       Logger.Debug("Server Heartbeat ticked");
 
+      // [chn] why is transaction management done here
       using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) {
-
         List<ClientDto> allClients = new List<ClientDto>(DaoLocator.ClientDao.FindAll());
 
@@ -144,5 +140,5 @@
         }
         CheckForPendingJobs();
-        DaoLocator.DestroyContext();
+//        DaoLocator.DestroyContext();
         scope.Complete();
       }
@@ -595,5 +591,4 @@
     }
 
-
     /// <summary>
     /// the client can send job results during calculating 
@@ -616,5 +611,4 @@
     }
 
-
     public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
       return ProcessJobResult(clientId, jobId, result, percentage, exception, false);
@@ -628,5 +622,4 @@
     /// <returns></returns>                       
     public Response Logout(Guid clientId) {
-
       Logger.Info("Client logged out " + clientId);
 
@@ -720,5 +713,4 @@
 
       return response;
-
     }
 
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientFacade.cs	(revision 4091)
+++ 	(revision )
@@ -1,154 +1,0 @@
-#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.Contracts.Interfaces;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.Hive.Contracts;
-using HeuristicLab.PluginInfrastructure;
-using System.IO;
-using System.Runtime.Serialization.Formatters.Binary;
-using System.ServiceModel;
-using HeuristicLab.Hive.Server.Core.InternalInterfaces;
-using System.Transactions;
-
-namespace HeuristicLab.Hive.Server.Core {
-  [ServiceBehavior(InstanceContextMode =
-    InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
-  public class ClientFacade: IClientFacade {
-
-    public ClientFacade() {      
-    }
-
-    private IClientCommunicator clientCommunicator =
-      ServiceLocator.GetClientCommunicator();
-
-    #region IClientCommunicator Members
-
-    public Response Login(ClientDto clientInfo) {
-      return clientCommunicator.Login(clientInfo);
-    }
-
-    public ResponseHB ProcessHeartBeat(HeartBeatData hbData) {
-      return clientCommunicator.ProcessHeartBeat(hbData);
-    }
-
-
-    public ResponseJob SendJob(Guid clientId) {
-      return clientCommunicator.SendJob(clientId);
-    }
-
-    /*public ResponseSerializedJob SendSerializedJob(Guid clientId) {
-      return clientCommunicator.SendSerializedJob(clientId);
-    } */
-
-    public ResponseResultReceived StoreFinishedJobResult(Guid clientId,
-      Guid jobId,
-      byte[] result,
-      double percentage, 
-      Exception exception) {
-      return clientCommunicator.StoreFinishedJobResult(clientId, jobId, result, percentage, exception);
-    }
-
-    public Response Logout(Guid clientId) {
-      return clientCommunicator.Logout(clientId);
-    }
-
-    public Response IsJobStillNeeded(Guid jobId) {
-      return clientCommunicator.IsJobStillNeeded(jobId);
-    }
-
-    public ResponsePlugin SendPlugins(List<HivePluginInfoDto> pluginList) {
-      return clientCommunicator.SendPlugins(pluginList);
-    }
-
-    public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
-      return clientCommunicator.ProcessSnapshot(clientId, jobId, result, percentage, exception);
-    }
-
-
-    public ResponseCalendar GetCalendar(Guid clientId) {
-      return clientCommunicator.GetCalendar(clientId);
-    }
-
-    public Response SetCalendarStatus(Guid clientId, CalendarState state) {
-      return clientCommunicator.SetCalendarStatus(clientId, state);      
-    }
-    #endregion
-
-    #region IClientFacade Members
-
-    [SpringTransaction(UserTransaction = true)]
-    public Stream SendStreamedJob(Guid clientId) {
-      MultiStream stream =
-        new MultiStream();
-
-      ResponseJob job = null;
-
-      job = this.SendJob(clientId);      
-
-      //first send response
-      stream.AddStream(
-        new StreamedObject<ResponseJob>(job));
-
-      IJobManager jobManager = 
-        ServiceLocator.GetJobManager();
-      IInternalJobManager internalJobManager = (IInternalJobManager) jobManager;
-      
-      //second stream the job binary data
-      MemoryStream memoryStream = new MemoryStream();      
-      if(job.Job != null)
-        stream.AddStream(new MemoryStream(internalJobManager.GetSerializedJobDataById(job.Job.Id)));
-      
-      OperationContext clientContext = OperationContext.Current;
-        clientContext.OperationCompleted += new EventHandler(delegate(object sender, EventArgs args) {
-          if (stream != null) {
-            stream.Dispose();
-          }
-        });
-
-      return stream;
-    }
-
-    public Stream SendStreamedPlugins(List<HivePluginInfoDto> pluginList) {
-      return
-        new StreamedObject<ResponsePlugin>(
-          this.SendPlugins(pluginList));
-    }
-
-    public ResponseResultReceived StoreFinishedJobResultStreamed(Stream stream) {
-      return ((IInternalClientCommunicator)
-        clientCommunicator).ProcessJobResult(stream, true);
-    } 
-
-    public ResponseResultReceived ProcessSnapshotStreamed(Stream stream) {
-      return ((IInternalClientCommunicator)
-        clientCommunicator).ProcessJobResult(stream, false);
-    }
-
-
-
-    #endregion
-  }
-}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DaoLocator.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DaoLocator.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DaoLocator.cs	(revision 4092)
@@ -62,12 +62,4 @@
       }
     }
-
-    public static void DestroyContext() {
-      if (ContextFactory.IsContextNull()) {
-        ContextFactory.Context.Dispose();
-        ContextFactory.Context = null;
-      }
-    }
-
   }
 }
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 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/DbTestApp.cs	(revision 4092)
@@ -33,8 +33,11 @@
 using HeuristicLab.PluginInfrastructure;
 using HeuristicLab.Tracing;
+using HeuristicLab.Hive.Server.DataAccess;
 
 namespace HeuristicLab.Hive.Server {
   [Application("Hive DB Test App", "Test Application for the Hive DataAccess Layer")]
   internal class HiveDbTestApplication : ApplicationBase {
+    private IContextFactory contextFactory = ServiceLocator.GetContextFactory();
+
     /*private void TestJobStreaming() {
       ISessionFactory factory =
@@ -150,12 +153,12 @@
 
       JobDto job = new JobDto {
-                                Client = c1,
-                                CoresNeeded = 2,
-                                DateCreated = DateTime.Now,
-                                MemoryNeeded = 500,
-                                Percentage = 0,
-                                Priority = 1,
-                                State = State.offline
-                              };
+        Client = c1,
+        CoresNeeded = 2,
+        DateCreated = DateTime.Now,
+        MemoryNeeded = 500,
+        Percentage = 0,
+        Priority = 1,
+        State = State.offline
+      };
 
       job = DaoLocator.JobDao.Insert(job);
@@ -214,5 +217,5 @@
     }
 
-
+    
     public override void Run() {
       //TestClientGroupAdapter();
@@ -221,22 +224,26 @@
       //TestJobResultStreaming();
       //TestJobResultDeserialization();
-
-      //if (ContextFactory.Context.DatabaseExists())
-      //  ContextFactory.Context.DeleteDatabase();
-      //ContextFactory.Context.CreateDatabase();
-      //TestLINQImplementation();
-      TestLinqFileHandling();
-      //StressTest();
-
-      //SpeedTest();
-      //TestJobBytearrFetching();
-      //TestJobStreamFetching();
+      using (contextFactory.GetContext(false)) {
+        if (contextFactory.CurrentContext.DatabaseExists())
+          contextFactory.CurrentContext.DeleteDatabase();
+        contextFactory.CurrentContext.CreateDatabase();
+      }
+
+      using (contextFactory.GetContext()) {
+        //TestLINQImplementation();
+        TestLinqFileHandling();
+
+        //StressTest();
+
+        //SpeedTest();
+        //TestJobBytearrFetching();
+        //TestJobStreamFetching();
+      }
+
     }
 
     private void WriteToJobWithByte(object jobid) {
       using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required,
-                                                           new TransactionOptions
-                                                           {IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE})
-        ) {
+                                                           new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) {
         Logger.Info("starting bytestuff for job " + jobid);
         DaoLocator.JobDao.SetBinaryJobFile((Guid)jobid, jobmap[(Guid)jobid]);
@@ -248,7 +255,5 @@
     private void UpdateJobStatus(object jobid) {
       using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required,
-                                                           new TransactionOptions
-                                                           {IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE})
-        ) {
+                                                           new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) {
         Thread.Sleep(1500);
         Logger.Info("starting now");
@@ -267,20 +272,20 @@
       List<Thread> jobupdateThreads = new List<Thread>();
       List<Thread> jobProgressThreads = new List<Thread>();
-      
+
       Random r = new Random();
       Stack<JobDto> jobs = new Stack<JobDto>(DaoLocator.JobDao.FindAll());
       Logger.Info("Fetched jobs");
-      for (int x = 0; x < 10 && jobs.Count > 0; x++ ) {
+      for (int x = 0; x < 10 && jobs.Count > 0; x++) {
         Logger.Info("Creating data for Job");
         JobDto job = jobs.Pop();
-        byte[] jobarr = new byte[50*1024*1024];
+        byte[] jobarr = new byte[50 * 1024 * 1024];
         for (int i = 0; i < jobarr.Length; i++) {
-          jobarr[i] = (byte) r.Next(255);
+          jobarr[i] = (byte)r.Next(255);
         }
         jobmap.Add(job.Id, jobarr);
       }
       Logger.Info("filled");
-      foreach(KeyValuePair<Guid, byte[]> kvp in jobmap) {
-        Thread tjob = new Thread(new ParameterizedThreadStart(WriteToJobWithByte));      
+      foreach (KeyValuePair<Guid, byte[]> kvp in jobmap) {
+        Thread tjob = new Thread(new ParameterizedThreadStart(WriteToJobWithByte));
         Thread tupdate = new Thread(new ParameterizedThreadStart(UpdateJobStatus));
         jobupdateThreads.Add(tupdate);
@@ -298,39 +303,19 @@
 
 
-    private
-      void TestJobStreamFetching() {
+    private void TestJobStreamFetching() {
       //using (TransactionScope scope = new TransactionScope()) {
 
-      HiveDataContext context = ContextFactory.Context;
-
-      ContextFactory.Context.Connection.Open
-        ();
-      ContextFactory.Context.Transaction
-        =
-        ContextFactory.Context.Connection.BeginTransaction
-          ();
-
+      HiveDataContext context = contextFactory.CurrentContext as HiveDataContext;
+
+      context.Connection.Open();
+      context.Transaction = context.Connection.BeginTransaction();
 
       ClientFacade facade = new ClientFacade();
-
       Stream stream = facade.SendStreamedJob(new Guid("F5CFB334-66A0-417C-A585-71711BA21D3F"));
 
-
       byte[] buffer = new byte[3024];
-
       int read = 0;
-
-      while ((
-               read
-               =
-               stream.Read
-                 (
-                 buffer
-                 , 0,
-                 buffer.Length
-                 )) > 0) {}
-
-      stream.Close
-        ();
+      while ((read = stream.Read(buffer, 0, buffer.Length)) > 0) { }
+      stream.Close();
 
       //Stream stream = DaoLocator.JobDao.GetSerializedJobStream(new Guid("bbb51f87-4e2f-4499-a9b6-884e589c78b6"));
@@ -338,15 +323,10 @@
     }
 
-    private
-      void TestJobBytearrFetching() {
+    private void TestJobBytearrFetching() {
       byte[] arr = DaoLocator.JobDao.GetBinaryJobFile(new Guid("A3386907-2B3C-4976-BE07-04D660D40A5B"));
-      Console.WriteLine
-        (
-        arr
-        );
-    }
-
-    private
-      void SpeedTest() {
+      Console.WriteLine(arr);
+    }
+
+    private void SpeedTest() {
       DateTime start = new DateTime();
 
@@ -356,8 +336,5 @@
 
       TimeSpan used = end - start;
-      Console.WriteLine
-        (
-        used.TotalMilliseconds
-        );
+      Console.WriteLine(used.TotalMilliseconds);
     }
   }
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ExecutionEngineFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ExecutionEngineFacade.cs	(revision 4091)
+++ 	(revision )
@@ -1,65 +1,0 @@
-﻿#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.Contracts.Interfaces;
-using HeuristicLab.Hive.Contracts;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-
-namespace HeuristicLab.Hive.Server.Core {
-  public class ExecutionEngineFacade: IExecutionEngineFacade {
-
-    private IJobManager jobManager =
-      ServiceLocator.GetJobManager();
-
-    public ExecutionEngineFacade() {
-      
-    }
-
-    #region IExecutionEngineFacade Members
-
-    public ResponseObject<JobDto> AddJob(SerializedJob job) {
-      return jobManager.AddNewJob(job);
-    }
-
-    public ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources) {      
-      return jobManager.AddJobWithGroupStrings(job, resources);
-    }
-
-    public Response RequestSnapshot(Guid jobId) {
-      return jobManager.RequestSnapshot(jobId);
-    }
-
-    public ResponseObject<SerializedJob> 
-      GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) {
-      return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot);
-    }
-
-    public Response AbortJob(Guid jobId) {
-      return jobManager.AbortJob(jobId);
-    }
-
-    #endregion
-  }
-}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ClientFacade.cs	(revision 4092)
@@ -33,64 +33,79 @@
 using HeuristicLab.Hive.Server.Core.InternalInterfaces;
 using System.Transactions;
+using HeuristicLab.Hive.Server.LINQDataAccess;
+using HeuristicLab.Hive.Server.DataAccess;
 
 namespace HeuristicLab.Hive.Server.Core {
-  [ServiceBehavior(InstanceContextMode =
-    InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
-  public class ClientFacade: IClientFacade {
+  [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
+  public class ClientFacade : IClientFacade {
 
-    public ClientFacade() {      
+    public ClientFacade() {
     }
 
     private IClientCommunicator clientCommunicator = ServiceLocator.GetClientCommunicator();
 
+    private IContextFactory contextFactory = ServiceLocator.GetContextFactory();
+
     #region IClientCommunicator Members
 
     public Response Login(ClientDto clientInfo) {
-      return clientCommunicator.Login(clientInfo);
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.Login(clientInfo);
+      }
     }
 
     public ResponseHB ProcessHeartBeat(HeartBeatData hbData) {
-      return clientCommunicator.ProcessHeartBeat(hbData);
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.ProcessHeartBeat(hbData);
+      }
     }
 
     public ResponseJob SendJob(Guid clientId) {
-      return clientCommunicator.SendJob(clientId);
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.SendJob(clientId);
+      }
     }
 
-    /*public ResponseSerializedJob SendSerializedJob(Guid clientId) {
-      return clientCommunicator.SendSerializedJob(clientId);
-    } */
-
-    public ResponseResultReceived StoreFinishedJobResult(Guid clientId,
-      Guid jobId,
-      byte[] result,
-      double percentage, 
-      Exception exception) {
-      return clientCommunicator.StoreFinishedJobResult(clientId, jobId, result, percentage, exception);
+    public ResponseResultReceived StoreFinishedJobResult(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.StoreFinishedJobResult(clientId, jobId, result, percentage, exception);
+      }
     }
 
     public Response Logout(Guid clientId) {
-      return clientCommunicator.Logout(clientId);
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.Logout(clientId);
+      }
     }
 
     public Response IsJobStillNeeded(Guid jobId) {
-      return clientCommunicator.IsJobStillNeeded(jobId);
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.IsJobStillNeeded(jobId); 
+      }
     }
 
     public ResponsePlugin SendPlugins(List<HivePluginInfoDto> pluginList) {
-      return clientCommunicator.SendPlugins(pluginList);
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.SendPlugins(pluginList);      
+      }
     }
 
     public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
-      return clientCommunicator.ProcessSnapshot(clientId, jobId, result, percentage, exception);
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.ProcessSnapshot(clientId, jobId, result, percentage, exception); 
+      }
     }
 
 
     public ResponseCalendar GetCalendar(Guid clientId) {
-      return clientCommunicator.GetCalendar(clientId);
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.GetCalendar(clientId); 
+      }
     }
 
-    public Response SetCalendarStatus(Guid clientId, CalendarState state) {
-      return clientCommunicator.SetCalendarStatus(clientId, state);      
+    public Response SetCalendarStatus(Guid clientId, CalendarState state) { 
+      using (contextFactory.GetContext()) {
+        return clientCommunicator.SetCalendarStatus(clientId, state);
+      }
     }
     #endregion
@@ -98,24 +113,27 @@
     #region IClientFacade Members
 
-    [SpringTransaction(UserTransaction = true)]
+    /// <summary>
+    /// Do not use automatic transactions here
+    /// </summary>
     public Stream SendStreamedJob(Guid clientId) {
-      MultiStream stream = new MultiStream();
+      using (contextFactory.GetContext(false)) {
+        MultiStream stream = new MultiStream();
 
-      ResponseJob job = null;
+        ResponseJob job = null;
 
-      job = this.SendJob(clientId);      
+        job = this.SendJob(clientId);
 
-      //first send response
-      stream.AddStream(new StreamedObject<ResponseJob>(job));
+        //first send response
+        stream.AddStream(new StreamedObject<ResponseJob>(job));
 
-      IJobManager jobManager = ServiceLocator.GetJobManager();
-      IInternalJobManager internalJobManager = (IInternalJobManager) jobManager;
-      
-      //second stream the job binary data
-      MemoryStream memoryStream = new MemoryStream();      
-      if(job.Job != null)
-        stream.AddStream(new MemoryStream(internalJobManager.GetSerializedJobDataById(job.Job.Id)));
-      
-      OperationContext clientContext = OperationContext.Current;
+        IJobManager jobManager = ServiceLocator.GetJobManager();
+        IInternalJobManager internalJobManager = (IInternalJobManager)jobManager;
+
+        //second stream the job binary data
+        MemoryStream memoryStream = new MemoryStream();
+        if (job.Job != null)
+          stream.AddStream(new MemoryStream(internalJobManager.GetSerializedJobDataById(job.Job.Id)));
+
+        OperationContext clientContext = OperationContext.Current;
         clientContext.OperationCompleted += new EventHandler(delegate(object sender, EventArgs args) {
           if (stream != null) {
@@ -124,17 +142,24 @@
         });
 
-      return stream;
+        return stream;
+      }
     }
 
     public Stream SendStreamedPlugins(List<HivePluginInfoDto> pluginList) {
-      return new StreamedObject<ResponsePlugin>(this.SendPlugins(pluginList));
+      using (contextFactory.GetContext()) {
+        return new StreamedObject<ResponsePlugin>(this.SendPlugins(pluginList));
+      }
     }
 
     public ResponseResultReceived StoreFinishedJobResultStreamed(Stream stream) {
-      return ((IInternalClientCommunicator)clientCommunicator).ProcessJobResult(stream, true);
-    } 
+      using (contextFactory.GetContext()) {
+        return ((IInternalClientCommunicator)clientCommunicator).ProcessJobResult(stream, true);
+      }
+    }
 
     public ResponseResultReceived ProcessSnapshotStreamed(Stream stream) {
-      return ((IInternalClientCommunicator)clientCommunicator).ProcessJobResult(stream, false);
+      using (contextFactory.GetContext()) {
+        return ((IInternalClientCommunicator)clientCommunicator).ProcessJobResult(stream, false);  
+      }
     }
     #endregion
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ExecutionEngineFacade.cs	(revision 4092)
@@ -27,13 +27,13 @@
 using HeuristicLab.Hive.Contracts;
 using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.Hive.Server.DataAccess;
 
 namespace HeuristicLab.Hive.Server.Core {
-  public class ExecutionEngineFacade: IExecutionEngineFacade {
+  public class ExecutionEngineFacade : IExecutionEngineFacade {
 
-    private IJobManager jobManager =
-      ServiceLocator.GetJobManager();
+    private IJobManager jobManager = ServiceLocator.GetJobManager();
+    private IContextFactory contextFactory = ServiceLocator.GetContextFactory();
 
     public ExecutionEngineFacade() {
-      
     }
 
@@ -41,22 +41,31 @@
 
     public ResponseObject<JobDto> AddJob(SerializedJob job) {
-      return jobManager.AddNewJob(job);
+      using (contextFactory.GetContext()) {
+        return jobManager.AddNewJob(job);
+      }
     }
 
-    public ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources) {      
-      return jobManager.AddJobWithGroupStrings(job, resources);
+    public ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources) {
+      using (contextFactory.GetContext()) {
+        return jobManager.AddJobWithGroupStrings(job, resources);
+      }
     }
 
     public Response RequestSnapshot(Guid jobId) {
-      return jobManager.RequestSnapshot(jobId);
+      using (contextFactory.GetContext()) {
+        return jobManager.RequestSnapshot(jobId);
+      }
     }
 
-    public ResponseObject<SerializedJob> 
-      GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) {
-      return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot);
+    public ResponseObject<SerializedJob> GetLastSerializedResult(Guid jobId, bool requested, bool snapshot) {
+      using (contextFactory.GetContext()) {
+        return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot);
+      }
     }
 
     public Response AbortJob(Guid jobId) {
-      return jobManager.AbortJob(jobId);
+      using (contextFactory.GetContext()) {
+        return jobManager.AbortJob(jobId);
+      }
     }
 
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs	(revision 4092)
@@ -30,166 +30,223 @@
 using HeuristicLab.Hive.Server.Core.InternalInterfaces;
 using System.ServiceModel;
+using HeuristicLab.Hive.Server.DataAccess;
 
 
 namespace HeuristicLab.Hive.Server.Core {
-  public class ServerConsoleFacade: IServerConsoleFacade {
-    private IClientManager clientManager = 
-      ServiceLocator.GetClientManager();
-
-    private IJobManager jobManager = 
-      ServiceLocator.GetJobManager();
+  public class ServerConsoleFacade : IServerConsoleFacade {
+    private IClientManager clientManager = ServiceLocator.GetClientManager();
+
+    private IJobManager jobManager = ServiceLocator.GetJobManager();
 
     private IHivePermissionManager secMan = ServiceLocator.GetHivePermissionManager();
 
+    private IContextFactory contextFactory = ServiceLocator.GetContextFactory();
+
     public Guid sessionID = Guid.Empty;
 
-    public ServerConsoleFacade() {      
+    public ServerConsoleFacade() {
     }
 
     public Response Login(string username, string password) {
-      Response resp = new Response();
-     
-      sessionID = secMan.Login(username, password);
-      if (sessionID == Guid.Empty) {
-        resp.Success = false;
-        resp.StatusMessage = ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_FAILED;
-      } else {
-        resp.Success = true;
-        resp.StatusMessage =
-          ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_SUCCESS;
-      }
-      return resp;
+      using (contextFactory.GetContext()) {
+        Response resp = new Response();
+
+        sessionID = secMan.Login(username, password);
+        if (sessionID == Guid.Empty) {
+          resp.Success = false;
+          resp.StatusMessage = ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_FAILED;
+        } else {
+          resp.Success = true;
+          resp.StatusMessage =
+            ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_SUCCESS;
+        }
+        return resp;
+      }
     }
 
 
     public ResponseList<ClientDto> GetAllClients() {
-      secMan.Authorize("AccessClients", sessionID, Guid.Empty);
-      return clientManager.GetAllClients();
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessClients", sessionID, Guid.Empty);
+        return clientManager.GetAllClients();
+      }
     }
 
     public ResponseList<ClientGroupDto> GetAllClientGroups() {
-      //secMan.Authorize("AccessClientGroup", sessionID, Guid.Empty);
-      return clientManager.GetAllClientGroups();
+      using (contextFactory.GetContext()) {
+        //secMan.Authorize("AccessClientGroup", sessionID, Guid.Empty);
+        return clientManager.GetAllClientGroups();
+      }
     }
 
     public ResponseList<UpTimeStatisticsDto> GetAllUpTimeStatistics() {
-      secMan.Authorize("AccessStatistics", sessionID, Guid.Empty);
-      return clientManager.GetAllUpTimeStatistics();
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessStatistics", sessionID, Guid.Empty);
+        return clientManager.GetAllUpTimeStatistics();
+      }
     }
 
     public ResponseObject<ClientGroupDto> AddClientGroup(ClientGroupDto clientGroup) {
-      secMan.Authorize("AddClientGroup", sessionID, Guid.Empty);
-      return clientManager.AddClientGroup(clientGroup);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AddClientGroup", sessionID, Guid.Empty);
+        return clientManager.AddClientGroup(clientGroup);
+      }
     }
 
     public Response AddResourceToGroup(Guid clientGroupId, ResourceDto resource) {
-      secMan.Authorize("AddResource", sessionID, Guid.Empty);                
-      return clientManager.AddResourceToGroup(clientGroupId, resource);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AddResource", sessionID, Guid.Empty);
+        return clientManager.AddResourceToGroup(clientGroupId, resource);
+      }
     }
 
     public Response DeleteResourceFromGroup(Guid clientGroupId, Guid resourceId) {
+      using (contextFactory.GetContext()) {
         return clientManager.DeleteResourceFromGroup(clientGroupId, resourceId);
+      }
     }
 
     public ResponseList<JobDto> GetAllJobs() {
-      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
-      return jobManager.GetAllJobs();
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
+        return jobManager.GetAllJobs();
+      }
     }
 
     public ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count) {
-      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
-      return jobManager.GetAllJobsWithFilter(jobState, offset, count);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
+        return jobManager.GetAllJobsWithFilter(jobState, offset, count);
+      }
     }
 
     public ResponseObject<JobDto> GetJobById(Guid jobId) {
-      secMan.Authorize("AccessJobs", sessionID, jobId);
-      return jobManager.GetJobById(jobId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobs", sessionID, jobId);
+        return jobManager.GetJobById(jobId);
+      }
     }
 
     public ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId) {
-      secMan.Authorize("AccessJobs", sessionID, jobId);
-      return jobManager.GetJobByIdWithDetails(jobId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobs", sessionID, jobId);
+        return jobManager.GetJobByIdWithDetails(jobId);
+      }
     }
 
     public ResponseObject<JobDto> AddNewJob(SerializedJob job) {
-      secMan.Authorize("AddJob", sessionID, job.JobInfo.Id);
-      return jobManager.AddNewJob(job);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AddJob", sessionID, job.JobInfo.Id);
+        return jobManager.AddNewJob(job);
+      }
     }
 
     public ResponseObject<JobDto> GetLastJobResultOf(Guid jobId) {
-      secMan.Authorize("AccessJobResults", sessionID, jobId);
-      return jobManager.GetLastJobResultOf(jobId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobResults", sessionID, jobId);
+        return jobManager.GetLastJobResultOf(jobId);
+      }
     }
 
     public ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot) {
-      secMan.Authorize("AccessJobResults", sessionID, jobId);
-      return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobResults", sessionID, jobId);
+        return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot);
+      }
     }
 
     public ResponseList<JobResult> GetAllJobResults(Guid jobId) {
-      secMan.Authorize("AccessJobResults", sessionID, jobId);  
-      return jobManager.GetAllJobResults(jobId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobResults", sessionID, jobId);
+        return jobManager.GetAllJobResults(jobId);
+      }
     }
 
     public Response RemoveJob(Guid jobId) {
-      secMan.Authorize("RemoveJob", sessionID, jobId);
-      return jobManager.RemoveJob(jobId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("RemoveJob", sessionID, jobId);
+        return jobManager.RemoveJob(jobId);
+      }
     }
 
     public Response RequestSnapshot(Guid jobId) {
-      secMan.Authorize("AccessJobResults", sessionID, jobId);  
-      return jobManager.RequestSnapshot(jobId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobResults", sessionID, jobId);
+        return jobManager.RequestSnapshot(jobId);
+      }
     }
 
     public Response AbortJob(Guid jobId) {
-      secMan.Authorize("AbortJob", sessionID, Guid.Empty);
-      return jobManager.AbortJob(jobId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AbortJob", sessionID, Guid.Empty);
+        return jobManager.AbortJob(jobId);
+      }
     }
 
     public ResponseObject<List<ClientGroupDto>> GetAllGroupsOfResource(Guid resourceId) {
-      secMan.Authorize("AccessUserGroup", sessionID, Guid.Empty);
-      return clientManager.GetAllGroupsOfResource(resourceId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessUserGroup", sessionID, Guid.Empty);
+        return clientManager.GetAllGroupsOfResource(resourceId);
+      }
     }
 
     public Response DeleteClientGroup(Guid clientGroupId) {
-      secMan.Authorize("DeleteClientGroup", sessionID, Guid.Empty);
-      return clientManager.DeleteClientGroup(clientGroupId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("DeleteClientGroup", sessionID, Guid.Empty);
+        return clientManager.DeleteClientGroup(clientGroupId);
+      }
     }
 
     public ResponseList<ProjectDto> GetAllProjects() {
-      secMan.Authorize("AccessProjects", sessionID, Guid.Empty);
-      return jobManager.GetAllProjects();
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessProjects", sessionID, Guid.Empty);
+        return jobManager.GetAllProjects();
+      }
     }
 
     public Response CreateProject(ProjectDto project) {
-      secMan.Authorize("CreateProjects", sessionID, Guid.Empty);
-      return jobManager.CreateProject(project);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("CreateProjects", sessionID, Guid.Empty);
+        return jobManager.CreateProject(project);
+      }
     }
 
     public Response ChangeProject(ProjectDto project) {
-      secMan.Authorize("ChangeProjects", sessionID, Guid.Empty);
-      return jobManager.ChangeProject(project);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("ChangeProjects", sessionID, Guid.Empty);
+        return jobManager.ChangeProject(project);
+      }
     }
 
     public Response DeleteProject(Guid projectId) {
-      secMan.Authorize("DeleteProjects", sessionID, projectId);
-      return jobManager.DeleteProject(projectId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("DeleteProjects", sessionID, projectId);
+        return jobManager.DeleteProject(projectId);
+      }
     }
 
     public ResponseList<JobDto> GetJobsByProject(Guid projectId) {
-      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
-      return jobManager.GetJobsByProject(projectId);
+      using (contextFactory.GetContext()) {
+        secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
+        return jobManager.GetJobsByProject(projectId);
+      }
     }
 
     public ResponseList<AppointmentDto> GetUptimeCalendarForResource(Guid guid) {
-      return clientManager.GetUptimeCalendarForResource(guid);
+      using (contextFactory.GetContext()) {
+        return clientManager.GetUptimeCalendarForResource(guid);
+      }
     }
 
     public Response SetUptimeCalendarForResource(Guid guid, IEnumerable<AppointmentDto> appointments, bool isForced) {
-      return clientManager.SetUptimeCalendarForResource(guid, appointments, isForced);
+      using (contextFactory.GetContext()) {
+        return clientManager.SetUptimeCalendarForResource(guid, appointments, isForced);
+      }
     }
 
     public ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources) {
-      return jobManager.AddJobWithGroupStrings(job, resources);
+      using (contextFactory.GetContext()) {
+        return jobManager.AddJobWithGroupStrings(job, resources);
+      }
     }
   }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj	(revision 4092)
@@ -112,10 +112,10 @@
     <Compile Include="Authorization\PolicyCollection.cs" />
     <Compile Include="ClientCommunicator.cs" />
-    <Compile Include="ClientFacade.cs" />
+    <Compile Include="Facades\ClientFacade.cs" />
     <Compile Include="ClientManager.cs" />
     <Compile Include="DaoLocator.cs" />
     <Compile Include="DbTestApp.cs" />
     <Compile Include="DefaultScheduler.cs" />
-    <Compile Include="ExecutionEngineFacade.cs" />
+    <Compile Include="Facades\ExecutionEngineFacade.cs" />
     <Compile Include="Authorization\HivePermissionManager.cs" />
     <Compile Include="HiveServerCorePlugin.cs" />
@@ -128,5 +128,5 @@
     <Compile Include="LifecycleManager.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="ServerConsoleFacade.cs" />
+    <Compile Include="Facades\ServerConsoleFacade.cs" />
     <Compile Include="ServiceLocator.cs" />
     <Compile Include="Properties\Settings.Designer.cs">
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs	(revision 4092)
@@ -37,5 +37,5 @@
 using System.Transactions;
 using HeuristicLab.Hive.Server.LINQDataAccess;
-using IsolationLevel=System.Transactions.IsolationLevel;
+using IsolationLevel = System.Transactions.IsolationLevel;
 
 namespace HeuristicLab.Hive.Server.Core {
@@ -59,10 +59,9 @@
 
 
-    private void checkForDeadJobs() {
+    private void CheckForDeadJobs() {
       Logger.Info("Searching for dead Jobs");
-      using (
-        TransactionScope scope = new TransactionScope(TransactionScopeOption.Required,
-                                                      new TransactionOptions
-                                                      {IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE})) {
+
+      // [chn] why is transaction management done here?
+      using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) {
         List<JobDto> allJobs = new List<JobDto>(DaoLocator.JobDao.FindAll());
         foreach (JobDto curJob in allJobs) {
@@ -73,10 +72,10 @@
         scope.Complete();
       }
-      DaoLocator.DestroyContext();
+      // DaoLocator.DestroyContext();
     }
 
     private void lifecycleManager_OnStartup(object sender, EventArgs e) {
       Logger.Info("Startup Event Fired, Checking DB for consistency");
-      checkForDeadJobs();
+      CheckForDeadJobs();
       Logger.Info("Startup Event Done");
     }
@@ -84,5 +83,5 @@
     private void lifecycleManager_OnShutdown(object sender, EventArgs e) {
       Logger.Info("Startup Event Fired, Checking DB for consistency");
-      checkForDeadJobs();
+      CheckForDeadJobs();
       Logger.Info("Startup Event Done");
     }
@@ -129,6 +128,5 @@
         response.Success = true;
         response.StatusMessage = ApplicationConstants.RESPONSE_JOB_GET_JOB_BY_ID;
-      }
-      else {
+      } else {
         response.Success = false;
         response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST;
@@ -146,6 +144,5 @@
 
         job.Obj.Client = DaoLocator.ClientDao.GetClientForJob(jobId);
-      }
-      else {
+      } else {
         job.Success = false;
         job.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_DOESNT_EXIST;
@@ -196,6 +193,5 @@
         response.Obj = job.JobInfo;
         response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_ADDED;
-      }
-      else {
+      } else {
         response.Success = false;
         response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_NULL;
@@ -255,5 +251,5 @@
 
       //if it's NOT a snapshot, NEITHER request NOR is it finished
-      if(!requested && !snapshot && job.State != State.finished) {      
+      if (!requested && !snapshot && job.State != State.finished) {
         response.Success = true;
         response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE;
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/LifecycleManager.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/LifecycleManager.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/LifecycleManager.cs	(revision 4092)
@@ -37,4 +37,5 @@
     private static event EventHandler OnStartup;
     private static event EventHandler OnShutdown;
+
     #region ILifecycleManager Members
 
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs	(revision 4092)
@@ -55,5 +55,5 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.3.0.4078")]
-[assembly: AssemblyFileVersion("3.3.0.4078")]
-[assembly: AssemblyBuildDate("2010/07/23 09:04:35")]
+[assembly: AssemblyVersion("3.3.0.4091")]
+[assembly: AssemblyFileVersion("3.3.0.4091")]
+[assembly: AssemblyBuildDate("2010/07/23 14:14:54")]
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ServerConsoleFacade.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ServerConsoleFacade.cs	(revision 4091)
+++ 	(revision )
@@ -1,196 +1,0 @@
-﻿#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.Contracts.Interfaces;
-using HeuristicLab.Hive.Contracts.BusinessObjects;
-using HeuristicLab.Hive.Contracts;
-using HeuristicLab.Security.Contracts.Interfaces;
-using HeuristicLab.Hive.Server.Core.InternalInterfaces;
-using System.ServiceModel;
-
-
-namespace HeuristicLab.Hive.Server.Core {
-  public class ServerConsoleFacade: IServerConsoleFacade {
-    private IClientManager clientManager = 
-      ServiceLocator.GetClientManager();
-
-    private IJobManager jobManager = 
-      ServiceLocator.GetJobManager();
-
-    private IHivePermissionManager secMan = ServiceLocator.GetHivePermissionManager();
-
-    public Guid sessionID = Guid.Empty;
-
-    public ServerConsoleFacade() {      
-    }
-
-    public Response Login(string username, string password) {
-      Response resp = new Response();
-     
-      sessionID = secMan.Login(username, password);
-      if (sessionID == Guid.Empty) {
-        resp.Success = false;
-        resp.StatusMessage = ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_FAILED;
-      } else {
-        resp.Success = true;
-        resp.StatusMessage =
-          ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_SUCCESS;
-      }
-      return resp;
-    }
-
-
-    public ResponseList<ClientDto> GetAllClients() {
-      secMan.Authorize("AccessClients", sessionID, Guid.Empty);
-      return clientManager.GetAllClients();
-    }
-
-    public ResponseList<ClientGroupDto> GetAllClientGroups() {
-      //secMan.Authorize("AccessClientGroup", sessionID, Guid.Empty);
-      return clientManager.GetAllClientGroups();
-    }
-
-    public ResponseList<UpTimeStatisticsDto> GetAllUpTimeStatistics() {
-      secMan.Authorize("AccessStatistics", sessionID, Guid.Empty);
-      return clientManager.GetAllUpTimeStatistics();
-    }
-
-    public ResponseObject<ClientGroupDto> AddClientGroup(ClientGroupDto clientGroup) {
-      secMan.Authorize("AddClientGroup", sessionID, Guid.Empty);
-      return clientManager.AddClientGroup(clientGroup);
-    }
-
-    public Response AddResourceToGroup(Guid clientGroupId, ResourceDto resource) {
-      secMan.Authorize("AddResource", sessionID, Guid.Empty);                
-      return clientManager.AddResourceToGroup(clientGroupId, resource);
-    }
-
-    public Response DeleteResourceFromGroup(Guid clientGroupId, Guid resourceId) {
-        return clientManager.DeleteResourceFromGroup(clientGroupId, resourceId);
-    }
-
-    public ResponseList<JobDto> GetAllJobs() {
-      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
-      return jobManager.GetAllJobs();
-    }
-
-    public ResponseList<JobDto> GetAllJobsWithFilter(State jobState, int offset, int count) {
-      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
-      return jobManager.GetAllJobsWithFilter(jobState, offset, count);
-    }
-
-    public ResponseObject<JobDto> GetJobById(Guid jobId) {
-      secMan.Authorize("AccessJobs", sessionID, jobId);
-      return jobManager.GetJobById(jobId);
-    }
-
-    public ResponseObject<JobDto> GetJobByIdWithDetails(Guid jobId) {
-      secMan.Authorize("AccessJobs", sessionID, jobId);
-      return jobManager.GetJobByIdWithDetails(jobId);
-    }
-
-    public ResponseObject<JobDto> AddNewJob(SerializedJob job) {
-      secMan.Authorize("AddJob", sessionID, job.JobInfo.Id);
-      return jobManager.AddNewJob(job);
-    }
-
-    public ResponseObject<JobDto> GetLastJobResultOf(Guid jobId) {
-      secMan.Authorize("AccessJobResults", sessionID, jobId);
-      return jobManager.GetLastJobResultOf(jobId);
-    }
-
-    public ResponseObject<SerializedJob> GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot) {
-      secMan.Authorize("AccessJobResults", sessionID, jobId);
-      return jobManager.GetLastSerializedJobResultOf(jobId, requested, snapshot);
-    }
-
-    public ResponseList<JobResult> GetAllJobResults(Guid jobId) {
-      secMan.Authorize("AccessJobResults", sessionID, jobId);  
-      return jobManager.GetAllJobResults(jobId);
-    }
-
-    public Response RemoveJob(Guid jobId) {
-      secMan.Authorize("RemoveJob", sessionID, jobId);
-      return jobManager.RemoveJob(jobId);
-    }
-
-    public Response RequestSnapshot(Guid jobId) {
-      secMan.Authorize("AccessJobResults", sessionID, jobId);  
-      return jobManager.RequestSnapshot(jobId);
-    }
-
-    public Response AbortJob(Guid jobId) {
-      secMan.Authorize("AbortJob", sessionID, Guid.Empty);
-      return jobManager.AbortJob(jobId);
-    }
-
-    public ResponseObject<List<ClientGroupDto>> GetAllGroupsOfResource(Guid resourceId) {
-      secMan.Authorize("AccessUserGroup", sessionID, Guid.Empty);
-      return clientManager.GetAllGroupsOfResource(resourceId);
-    }
-
-    public Response DeleteClientGroup(Guid clientGroupId) {
-      secMan.Authorize("DeleteClientGroup", sessionID, Guid.Empty);
-      return clientManager.DeleteClientGroup(clientGroupId);
-    }
-
-    public ResponseList<ProjectDto> GetAllProjects() {
-      secMan.Authorize("AccessProjects", sessionID, Guid.Empty);
-      return jobManager.GetAllProjects();
-    }
-
-    public Response CreateProject(ProjectDto project) {
-      secMan.Authorize("CreateProjects", sessionID, Guid.Empty);
-      return jobManager.CreateProject(project);
-    }
-
-    public Response ChangeProject(ProjectDto project) {
-      secMan.Authorize("ChangeProjects", sessionID, Guid.Empty);
-      return jobManager.ChangeProject(project);
-    }
-
-    public Response DeleteProject(Guid projectId) {
-      secMan.Authorize("DeleteProjects", sessionID, projectId);
-      return jobManager.DeleteProject(projectId);
-    }
-
-    public ResponseList<JobDto> GetJobsByProject(Guid projectId) {
-      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
-      return jobManager.GetJobsByProject(projectId);
-    }
-
-    public ResponseList<AppointmentDto> GetUptimeCalendarForResource(Guid guid) {
-      return clientManager.GetUptimeCalendarForResource(guid);
-    }
-
-    public Response SetUptimeCalendarForResource(Guid guid, IEnumerable<AppointmentDto> appointments, bool isForced) {
-      return clientManager.SetUptimeCalendarForResource(guid, appointments, isForced);
-    }
-
-    public ResponseObject<JobDto> AddJobWithGroupStrings(SerializedJob job, IEnumerable<string> resources) {
-      return jobManager.AddJobWithGroupStrings(job, resources);
-    }
-  }
-}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ServiceLocator.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ServiceLocator.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ServiceLocator.cs	(revision 4092)
@@ -31,127 +31,137 @@
 using HeuristicLab.Security.Contracts.Interfaces;
 
-/// <summary>
-/// The service locator for the server core
-/// </summary>
-public class ServiceLocator {
-  private static IClientManager clientManager = null;
+namespace HeuristicLab.Hive.Server.Core {
+  /// <summary>
+  /// The service locator for the server core
+  /// </summary>
+  public class ServiceLocator {
+    private static IClientManager clientManager = null;
 
-  private static IJobManager jobManager = null;
+    private static IJobManager jobManager = null;
 
-  private static IClientCommunicator clientCommunicator = null;
+    private static IClientCommunicator clientCommunicator = null;
 
-  private static ILifecycleManager lifecycleManager = null;
+    private static ILifecycleManager lifecycleManager = null;
 
-  private static ISessionFactory sessionFactory = null;
+    private static ISessionFactory sessionFactory = null;
 
-  private static IScheduler scheduler = null;
+    private static IScheduler scheduler = null;
 
-  private static IPermissionManager permManager = null;
+    private static IPermissionManager permManager = null;
 
-  private static IHivePermissionManager hivePermManager = null;
+    private static IHivePermissionManager hivePermManager = null;
 
-  /// <summary>
-  /// Gets the client manager
-  /// </summary>
-  /// <returns></returns>
-  [MethodImpl(MethodImplOptions.Synchronized)]
-  public static IClientManager GetClientManager() {
-    if (clientManager == null)
-      clientManager = new ClientManager();
+    private static IContextFactory contextFactory = null;
 
-    return clientManager;
-  }
+    /// <summary>
+    /// Gets the client manager
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static IClientManager GetClientManager() {
+      if (clientManager == null)
+        clientManager = new ClientManager();
 
-  /// <summary>
-  /// Gets the job manager
-  /// </summary>
-  /// <returns></returns>
-  [MethodImpl(MethodImplOptions.Synchronized)]
-  public static IJobManager GetJobManager() {
-    if (jobManager == null)
-      jobManager = new JobManager();
-
-    return jobManager;
-  }
-
-  /// <summary>
-  /// Gets the client Communicator
-  /// </summary>
-  /// <returns></returns>
-  [MethodImpl(MethodImplOptions.Synchronized)]
-  public static IClientCommunicator GetClientCommunicator() {
-    if (clientCommunicator == null)
-      clientCommunicator = new ClientCommunicator();
-
-    return clientCommunicator;
-  }
-
-  /// <summary>
-  /// Gets the lifecycle manager
-  /// </summary>
-  /// <returns></returns>
-  [MethodImpl(MethodImplOptions.Synchronized)]
-  public static ILifecycleManager GetLifecycleManager() {
-    if (lifecycleManager == null) {
-      lifecycleManager = new LifecycleManager();
-    }
-    return lifecycleManager;
-  }
-
-  /// <summary>
-  /// Gets the db session factory
-  /// </summary>
-  /// <returns></returns>
-  [MethodImpl(MethodImplOptions.Synchronized)]
-  public static ISessionFactory GetSessionFactory() {
-    if (sessionFactory == null) {
-      sessionFactory = 
-        ApplicationManager.Manager.GetInstances<ISessionFactory>().First();
-
-      sessionFactory.DbConnectionType =
-        typeof(SqlConnection);
-      
-      sessionFactory.DbConnectionString =
-        HeuristicLab.Hive.Server.Core.Properties.Settings.Default.HiveServerConnectionString;
+      return clientManager;
     }
 
-    return sessionFactory;
-  }
+    /// <summary>
+    /// Gets the job manager
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static IJobManager GetJobManager() {
+      if (jobManager == null)
+        jobManager = new JobManager();
 
-  /// <summary>
-  /// Gets the scheduler
-  /// </summary>
-  /// <returns></returns>
-  [MethodImpl(MethodImplOptions.Synchronized)]
-  public static IScheduler GetScheduler() {
-    if (scheduler == null) {
-      scheduler = ApplicationManager.Manager.GetInstances<IScheduler>().First();
+      return jobManager;
     }
 
-    return scheduler;
-  }
+    /// <summary>
+    /// Gets the client Communicator
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static IClientCommunicator GetClientCommunicator() {
+      if (clientCommunicator == null)
+        clientCommunicator = new ClientCommunicator();
 
-  /// <summary>
-  /// Gets the permission manager
-  /// </summary>
-  /// <returns></returns>
-  [MethodImpl(MethodImplOptions.Synchronized)]  
-  public static IPermissionManager GetPermissionManager() {
-    if (permManager == null)
-      permManager = ApplicationManager.Manager.GetInstances<IPermissionManager>().First();
-    return permManager;
-    
-  }
+      return clientCommunicator;
+    }
 
-  /// <summary>
-  /// Gets the permission manager
-  /// </summary>
-  /// <returns></returns>
-  [MethodImpl(MethodImplOptions.Synchronized)]
-  public static IHivePermissionManager GetHivePermissionManager() {
-    if (hivePermManager == null)
-      hivePermManager = ApplicationManager.Manager.GetInstances<IHivePermissionManager>().First();
-    return hivePermManager;
+    /// <summary>
+    /// Gets the lifecycle manager
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static ILifecycleManager GetLifecycleManager() {
+      if (lifecycleManager == null) {
+        lifecycleManager = new LifecycleManager();
+      }
+      return lifecycleManager;
+    }
 
+    /// <summary>
+    /// Gets the db session factory
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static ISessionFactory GetSessionFactory() {
+      if (sessionFactory == null) {
+        sessionFactory = ApplicationManager.Manager.GetInstances<ISessionFactory>().First();
+        sessionFactory.DbConnectionType = typeof(SqlConnection);
+        sessionFactory.DbConnectionString = HeuristicLab.Hive.Server.Core.Properties.Settings.Default.HiveServerConnectionString;
+      }
+
+      return sessionFactory;
+    }
+
+    /// <summary>
+    /// Gets the scheduler
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static IScheduler GetScheduler() {
+      if (scheduler == null) {
+        scheduler = ApplicationManager.Manager.GetInstances<IScheduler>().First();
+      }
+
+      return scheduler;
+    }
+
+    /// <summary>
+    /// Gets the permission manager
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static IPermissionManager GetPermissionManager() {
+      if (permManager == null)
+        permManager = ApplicationManager.Manager.GetInstances<IPermissionManager>().First();
+      return permManager;
+
+    }
+
+    /// <summary>
+    /// Gets the permission manager
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static IHivePermissionManager GetHivePermissionManager() {
+      if (hivePermManager == null)
+        hivePermManager = ApplicationManager.Manager.GetInstances<IHivePermissionManager>().First();
+      return hivePermManager;
+
+    }
+
+    /// <summary>
+    /// Gets the database context manager
+    /// </summary>
+    /// <returns></returns>
+    [MethodImpl(MethodImplOptions.Synchronized)]
+    public static IContextFactory GetContextFactory() {
+      if (contextFactory == null)
+        contextFactory = ApplicationManager.Manager.GetInstances<IContextFactory>().First();
+      return contextFactory;
+    }
   }
 }
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/app.config
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/app.config	(revision 4091)
+++ 	(revision )
@@ -1,44 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
-  <configSections>  
-    <sectionGroup name="spring">
-      <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
-      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core"/>
-    </sectionGroup>    
-    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
-      <section name="HeuristicLab.Hive.Server.Core.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-    </sectionGroup>
-  </configSections>
-  <applicationSettings>
-    <HeuristicLab.Hive.Server.Core.Properties.Settings>
-      <setting name="HiveServerConnectionString" serializeAs="String">
-        <value>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Persist Security Info=True;User ID=hive;Password=hive;Pooling=true;MultipleActiveResultSets=true</value>
-      </setting>
-    </HeuristicLab.Hive.Server.Core.Properties.Settings>
-  </applicationSettings>
-  <spring>
-    <context>
-      <resource uri="config://spring/objects"/>
-    </context>
-    
-    <objects xmlns="http://www.springframework.net"
-         xmlns:aop="http://www.springframework.net/aop">
-      <object id="calculator" singleton="false"
-              type="HeuristicLab.Hive.Server.Core.ClientFacade, HeuristicLab.Hive.Server.Core-3.2" />
-
-      <object id="serviceOperation" type="Spring.Aop.Support.SdkRegularExpressionMethodPointcut, Spring.Aop">
-        <property name="patterns">
-          <list>
-            <value>HeuristicLab.Hive.Server.Core.ClientFacade.*</value>
-          </list>
-        </property>
-      </object>
-
-      <object id="sci" type="HeuristicLab.Hive.Server.ServiceCallInterception, HeuristicLab.Hive.Server-3.2" />
-
-      <aop:config>
-        <aop:advisor pointcut-ref="serviceOperation" advice-ref="sci"/>
-      </aop:config>
-    </objects>
-  </spring>
-</configuration>
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/DataAccessException.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/DataAccessException.cs	(revision 4092)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/DataAccessException.cs	(revision 4092)
@@ -0,0 +1,11 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public class DataAccessException : Exception {
+    public DataAccessException(string message) : base(message) { }
+    public DataAccessException(string message, Exception innerException) : base(message, innerException) { }
+  }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj	(revision 4092)
@@ -86,8 +86,10 @@
   -->
   <ItemGroup>
+    <Compile Include="DataAccessException.cs" />
     <Compile Include="IClientConfigAdapter.cs" />
     <Compile Include="IClientConfigDao.cs" />
     <Compile Include="IClientDao.cs" />
     <Compile Include="IClientGroupDao.cs" />
+    <Compile Include="IContextFactory.cs" />
     <Compile Include="IGenericDao.cs" />
     <Compile Include="IJobDao.cs" />
@@ -132,4 +134,5 @@
     <Reference Include="System" />
     <Reference Include="System.Data" />
+    <Reference Include="System.Data.Linq" />
     <Reference Include="System.Transactions" />
     <Reference Include="System.Xml" />
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IContextFactory.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IContextFactory.cs	(revision 4092)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/IContextFactory.cs	(revision 4092)
@@ -0,0 +1,27 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Data.Linq;
+
+namespace HeuristicLab.Hive.Server.DataAccess {
+  public interface IContextFactory {
+
+    /// <summary>
+    /// Uses transaction by default.
+    /// The caller of this Method is resposible for disposing the Context!
+    /// </summary>
+    /// <returns></returns>
+    IDisposable GetContext();
+
+    IDisposable GetContext(bool withTransaction);
+
+    DataContext CurrentContext { get; }
+
+    void RollbackTransaction();
+
+    void RemoveContext();
+
+    void RemoveAndCompleteTransaction();
+  }
+}
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/BaseDao.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/BaseDao.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/BaseDao.cs	(revision 4092)
@@ -8,7 +8,9 @@
 namespace HeuristicLab.Hive.Server.LINQDataAccess {
   public abstract class BaseDao<TBusiness, TDatabaseEntity> {
+    private static ContextFactory contextFactory = new ContextFactory();
+
     public static HiveDataContext Context {
       get {
-        return ContextFactory.Context;
+        return contextFactory.CurrentContext as HiveDataContext;
       }
     }
@@ -17,6 +19,5 @@
       try {
         Context.SubmitChanges(ConflictMode.ContinueOnConflict);
-      } catch (ChangeConflictException e) {
-        
+      } catch (ChangeConflictException e) { 
         Logger.Warn("Concurrency Exception! " + e.Message);
         foreach (ObjectChangeConflict conflict in Context.ChangeConflicts) { 
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ClientConfigDao.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ClientConfigDao.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ClientConfigDao.cs	(revision 4092)
@@ -8,5 +8,4 @@
 namespace HeuristicLab.Hive.Server.LINQDataAccess {
   public class ClientConfigDao: BaseDao<ClientConfigDto, ClientConfig>, IClientConfigDao {
-
 
     #region IGenericDao<ClientConfigDto,ClientConfig> Members
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ContextFactory.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ContextFactory.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/ContextFactory.cs	(revision 4092)
@@ -3,41 +3,129 @@
 using System.Linq;
 using System.Text;
-using System.Data.Common;
-using System.Data.SqlClient;
+using HeuristicLab.Hive.Server.DataAccess;
+using System.Collections;
+using System.Data.Linq;
+using System.Transactions;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Hive.Contracts;
 using HeuristicLab.Tracing;
+using System.Threading;
+
 
 namespace HeuristicLab.Hive.Server.LINQDataAccess {
-  public class ContextFactory {
-    [ThreadStatic]
-    private static HiveDataContext _hiveDataContext = null;
+  /// <summary>
+  /// This class handles creates one Context for each Thread which asks for one.
+  /// If one Thread calls GetContext several times, it always gets the same Context object.
+  /// A context object is removed from the cache when it is disposed. 
+  /// 
+  /// Every context has a DB-Transaction over its livetime. After using the context object
+  /// it has to be disposed in order to finish the corresponding transaction.
+  /// </summary>
+  class ContextFactory : IContextFactory {
+    private static IDictionary<object, HiveDataContext> contexts = new Dictionary<object, HiveDataContext>();
+    private static IDictionary<object, TransactionScope> transactions = new Dictionary<object, TransactionScope>();
 
-    [ThreadStatic]
-    private static SqlTransaction _currentTransaction = null;
-
-    public static HiveDataContext Context { 
+    private static IContextFactory instance = null;
+    public static IContextFactory Instance {
       get {
-        if (_hiveDataContext == null) {
-          Logger.Debug("Requested new Data Context");
-          _hiveDataContext = new HiveDataContext("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=SSPI");
-          _hiveDataContext.CommandTimeout = 240;
-        }
-        return _hiveDataContext;        
-      } 
-      set {        
-        _hiveDataContext = value;
+        if (instance == null)
+          instance = new ContextFactory();
+        return instance;
       }
     }
 
-    public static SqlTransaction CurrentTransaction { 
-      get {
-        return _currentTransaction;
-      } set {
-        _currentTransaction = value;
-      } 
+    #region IContextManager Members
+
+    public IDisposable GetContext() {
+      return GetContext(true);
     }
 
-    public static bool IsContextNull() {
-      return _hiveDataContext == null;
+    public IDisposable GetContext(bool withTransaction) {
+      Logger.Debug("opening transaction");
+      object obj = Thread.CurrentThread;
+
+      if (contexts.ContainsKey(obj)) {
+        throw new DataAccessException("Context for this Thread already defined");
+      }
+
+      Logger.Debug("creating context");
+      DisposableHiveDataContext context = CreateContext();
+      context.OnDisposing += new EventHandler(context_OnDisposing);
+      contexts.Add(obj, context);
+
+      if (withTransaction) {
+        TransactionScope transaction = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE });
+        Logger.Debug("creating  transaction");
+        
+        transactions.Add(obj, transaction);
+      }
+      return context;
     }
+
+    private static DisposableHiveDataContext CreateContext() {
+      return new DisposableHiveDataContext("Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive;Integrated Security=SSPI");
+    }
+
+    void context_OnDisposing(object sender, EventArgs e) {
+      RemoveContext();
+      RemoveAndCompleteTransaction();
+    }
+
+    public void RollbackTransaction() {
+      Logger.Debug("rolling back transaction");
+      object obj = Thread.CurrentThread;
+
+      TransactionScope transaction = transactions[obj];
+      transaction.Dispose();
+    }
+
+    public void RemoveContext() {
+      Logger.Debug("removing context");
+      object obj = Thread.CurrentThread;
+
+      contexts.Remove(obj);
+      // context gets disposed implicitly, when it is used as IDisposable
+    }
+
+    public void RemoveAndCompleteTransaction() {
+      Logger.Debug("completing transaction");
+      object obj = Thread.CurrentThread;
+
+      // context does not always have an associated transaction
+      if (transactions.ContainsKey(obj)) {
+        transactions[obj].Complete();
+        transactions[obj].Dispose();
+        transactions.Remove(obj);
+      }
+    }
+
+    public DataContext CurrentContext {
+      get {
+        object obj = Thread.CurrentThread;
+        if (contexts.ContainsKey(obj)) {
+          return contexts[obj];
+        } else {
+          return null;
+        }
+      }
+    }
+
+    #endregion
+  }
+
+  /// <summary>
+  /// Offers an event when it gets disposed
+  /// </summary>
+  class DisposableHiveDataContext : HiveDataContext {
+
+    public DisposableHiveDataContext(string connection) : base(connection) { }
+
+    protected override void Dispose(bool disposing) {
+      base.Dispose(disposing);
+      if (OnDisposing != null)
+        OnDisposing(this, new EventArgs());
+    }
+
+    public event EventHandler OnDisposing;
   }
 }
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj	(revision 4092)
@@ -91,4 +91,5 @@
     </Reference>
     <Reference Include="System.Drawing" />
+    <Reference Include="System.Transactions" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml.Linq">
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/VarBinaryStream.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/VarBinaryStream.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/VarBinaryStream.cs	(revision 4092)
@@ -150,5 +150,5 @@
     dataColumn, string keyColumn, Guid key) {
       _connection = connection;
-      _transaction = (SqlTransaction) ContextFactory.Context.Transaction;
+      _transaction = (SqlTransaction) ContextFactory.Instance.CurrentContext.Transaction;
       /*
       if (_connection.State == ConnectionState.Closed) {
@@ -263,6 +263,6 @@
       if (_connection != null) {
         _connection.Close();
-        ContextFactory.Context.Dispose();
-        ContextFactory.Context = null;
+        ContextFactory.Instance.CurrentContext.Dispose();
+        ContextFactory.Instance.RemoveContext();
         Logger.Info("Connection and Context disposed and set null");
       }
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/app.config
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/app.config	(revision 4091)
+++ 	(revision )
@@ -1,10 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
-    <configSections>
-    </configSections>
-    <connectionStrings>
-        <add name="HeuristicLab.Hive.Server.LINQDataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString"
-            connectionString="Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Hive.Linq;Integrated Security=True;MultipleActiveResultSets=True"
-            providerName="System.Data.SqlClient" />
-    </connectionStrings>
-</configuration>
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/App.config
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/App.config	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server/3.3/App.config	(revision 4092)
@@ -36,4 +36,5 @@
       <object id="executionEngineFacade" singleton="false" type="HeuristicLab.Hive.Server.Core.ExecutionEngineFacade, HeuristicLab.Hive.Server.Core-3.3" />
       <object id="serverConsoleFacade" singleton="false" type="HeuristicLab.Hive.Server.Core.ServerConsoleFacade, HeuristicLab.Hive.Server.Core-3.3" />
+      
       <object id="serviceOperation" type="Spring.Aop.Support.SdkRegularExpressionMethodPointcut, Spring.Aop">
         <property name="patterns">
Index: /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/Properties/AssemblyInfo.cs
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/Properties/AssemblyInfo.cs	(revision 4091)
+++ /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/Properties/AssemblyInfo.cs	(revision 4092)
@@ -51,4 +51,4 @@
 //      Revision
 //
-[assembly: AssemblyVersion("3.3.0.4078")]
-[assembly: AssemblyFileVersion("3.3.0.4078")]
+[assembly: AssemblyVersion("3.3.0.4091")]
+[assembly: AssemblyFileVersion("3.3.0.4091")]
Index: anches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Security.Core/3.3/app.config
===================================================================
--- /branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Security.Core/3.3/app.config	(revision 4091)
+++ 	(revision )
@@ -1,21 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
-    <configSections>
-        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
-            <section name="HeuristicLab.Security.Core.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-            <section name="HeuristicLab.Security.Core.Properties.Settings1" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-        </sectionGroup>
-    </configSections>
-    <applicationSettings>
-        <HeuristicLab.Security.Core.Properties.Settings>
-            <setting name="SecurityServerConnectionString" serializeAs="String">
-                <value>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Integrated Security=True;Pooling=true;MultipleActiveResultSets=true</value>
-            </setting>
-        </HeuristicLab.Security.Core.Properties.Settings>
-        <HeuristicLab.Security.Core.Properties.Settings1>
-            <setting name="SecurityServerConnectionString" serializeAs="String">
-                <value>Data Source=127.0.0.1;Initial Catalog=HeuristicLab.Security;Persist Security Info=True;User ID=hive;Password=hive;Pooling=true;MultipleActiveResultSets=true</value>
-            </setting>
-        </HeuristicLab.Security.Core.Properties.Settings1>
-    </applicationSettings>
-</configuration>
