Index: trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/WcfService.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/WcfService.cs	(revision 1958)
+++ trunk/sources/HeuristicLab.Hive.Client.Communication/3.2/WcfService.cs	(revision 1959)
@@ -157,6 +157,11 @@
         if (ConnState == NetworkEnum.WcfConnState.Connected) {
           Response res = proxy.Login(clientInfo);
-          ConnState = NetworkEnum.WcfConnState.Loggedin;
-          Logging.Instance.Info(this.ToString(), res.StatusMessage);
+          if (!res.Success) {
+            Logging.Instance.Error(this.ToString(), "Login Failed! " + res.StatusMessage);
+            HandleNetworkError(null);
+          } else {
+            ConnState = NetworkEnum.WcfConnState.Loggedin;
+            Logging.Instance.Info(this.ToString(), res.StatusMessage);
+          }
         }
       }
@@ -297,4 +302,15 @@
     }
 
+    public Response IsJobStillNeeded(Guid jobId) {
+      try {
+        return proxy.IsJobStillNeeded(jobId);
+      }
+      catch (Exception e) {
+        HandleNetworkError(e);
+        return null;
+      }
+      
+    }
+
     public ResponseResultReceived ProcessSnapshotSync(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) {
       try {
Index: trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs	(revision 1958)
+++ trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs	(revision 1959)
@@ -72,4 +72,6 @@
       ConfigManager manager = ConfigManager.Instance;
       manager.Core = this;
+
+
       
       //Register all Wcf Service references
Index: trunk/sources/HeuristicLab.Hive.Client.Core/3.2/JobStorage/JobStorageManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Client.Core/3.2/JobStorage/JobStorageManager.cs	(revision 1958)
+++ trunk/sources/HeuristicLab.Hive.Client.Core/3.2/JobStorage/JobStorageManager.cs	(revision 1959)
@@ -10,4 +10,5 @@
 using System.Xml.Serialization;
 using System.Diagnostics;
+using System.Xml;
 
 namespace HeuristicLab.Hive.Client.Core.JobStorage {
@@ -15,22 +16,17 @@
     
     private static List<JobStorageInfo> storedJobsList = new List<JobStorageInfo>();
-    //Todo: execution path
-    //Todo: Choose a better directory name 
-    private static String path = "C:\\Program Files\\HeuristicLab 3.0\\plugins\\Hive.Client.Jobs\\";
+    
+    private static String path = System.IO.Directory.GetCurrentDirectory()+"\\plugins\\Hive.Client.Jobs\\";
     
     public static void PersistObjectToDisc(String serverIP, long serverPort, Guid jobId, byte[] job) {
       String filename = serverIP + "." + serverPort + "." + jobId.ToString();
       JobStorageInfo info = new JobStorageInfo { JobID = jobId, ServerIP = serverIP, ServerPort = serverPort, TimeFinished = DateTime.Now };
-
-      if (!Directory.Exists(path))
-        Directory.CreateDirectory(path);
-            
+      
       Stream jobstream = null;
       try {
         jobstream = File.Create(path + filename + ".dat");
         jobstream.Write(job, 0, job.Length);
-        storedJobsList.Add(info);
-        Debug.WriteLine("Job " + info.JobID + " stored on the harddisc");
-        //Logging.Instance.Info("JobStorageManager", "Job " + info.JobID + " stored on the harddisc");
+        storedJobsList.Add(info);        
+        Logging.Instance.Info("JobStorageManager", "Job " + info.JobID + " stored on the harddisc");
       }
       catch (Exception e) {
@@ -49,21 +45,21 @@
       for(int index=storedJobsList.Count; index > 0; index--) {
         if (WcfService.Instance.ConnState == NetworkEnum.WcfConnState.Loggedin && (storedJobsList[index-1].ServerIP == WcfService.Instance.ServerIP && storedJobsList[index-1].ServerPort == WcfService.Instance.ServerPort)) {
-          String filename = storedJobsList[index-1].ServerIP + "." + storedJobsList[index-1].ServerPort + "." + storedJobsList[index-1].JobID.ToString();
-          Debug.WriteLine("Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
-          //Logging.Instance.Info("JobStorrageManager", "Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
+          String filename = storedJobsList[index-1].ServerIP + "." + storedJobsList[index-1].ServerPort + "." + storedJobsList[index-1].JobID.ToString();          
+          Logging.Instance.Info("JobStorrageManager", "Sending stored job " + storedJobsList[index - 1].JobID + " to the server");
           byte[] job = File.ReadAllBytes(path + filename + ".dat");
+
+          if (WcfService.Instance.IsJobStillNeeded(storedJobsList[index - 1].JobID).StatusMessage == ApplicationConstants.RESPONSE_COMMUNICATOR_SEND_JOBRESULT) {
+            ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index - 1].JobID, job, 1.00, null, true);
+            if (!res.Success)
+              Logging.Instance.Error("JobStorageManager", "sending of job failed: " + res.StatusMessage);
+            else
+              Logging.Instance.Info("JobStorrageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done");      
+          }
+          ClientStatusInfo.JobsProcessed++;
+                  
           
-          //Todo: ask server first if he really wants the job...
-          ResponseResultReceived res = WcfService.Instance.SendStoredJobResultsSync(ConfigManager.Instance.GetClientInfo().Id, storedJobsList[index-1].JobID, job, 1.00, null, true);
-          ClientStatusInfo.JobsProcessed++;
-          //TODO: has to be fixed from server side
-          //if (res.Success == true) {
-          Debug.WriteLine("Sending of job " + storedJobsList[index - 1].JobID + " done");  
-          //Logging.Instance.Info("JobStorrageManager", "Sending of job " + storedJobsList[index - 1].JobID + " done");  
 
           storedJobsList.Remove(storedJobsList[index - 1]);
-          File.Delete(path + filename + ".dat");
-            
-       //   }
+          File.Delete(path + filename + ".dat");       
           }
         }
@@ -76,4 +72,26 @@
       writer.Close();
     }
+
+    static JobStorageManager() {
+      Logging.Instance.Info("JobStorrageManager", "Restoring Joblist from Harddisk");
+      if (!Directory.Exists(path))
+        Directory.CreateDirectory(path);
+            
+      XmlSerializer serializer = new XmlSerializer(typeof(List<JobStorageInfo>));
+      if(File.Exists(Path.Combine(path ,"list.xml"))) {
+        try {
+          FileStream stream = new FileStream(Path.Combine(path, "list.xml"), FileMode.Open);
+          XmlTextReader reader = new XmlTextReader(stream);
+          storedJobsList = (List<JobStorageInfo>)serializer.Deserialize(reader);
+          Logging.Instance.Info("JobStorrageManager", "Loaded " + storedJobsList.Count + " Elements");
+        }
+        catch (Exception e) {
+          Logging.Instance.Error("JobStorrageManager", "Exception while loading the Stored Job List", e);
+        }
+      } else {
+        Logging.Instance.Info("JobStorrageManager", "no stored jobs on harddisk, starting new list");
+        storedJobsList = new List<JobStorageInfo>();
+      }
+    }
     
   }
Index: trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Hive.log4net.xml
===================================================================
--- trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Hive.log4net.xml	(revision 1958)
+++ trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Hive.log4net.xml	(revision 1959)
@@ -10,5 +10,5 @@
     <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
     <layout type="log4net.Layout.PatternLayout">
-      <conversionPattern value="%-4timestamp [%appdomain/%thread] %-5level %logger %ndc - %message%newline%exception" />
+      <conversionPattern value="%-4timestamp %-5level% =>   %message%newline%exception" />
     </layout>
   </appender>
Index: trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Tracing-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Tracing-3.2.csproj	(revision 1958)
+++ trunk/sources/HeuristicLab.Tracing/3.2/HeuristicLab.Tracing-3.2.csproj	(revision 1959)
@@ -113,4 +113,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Content Include="HeuristicLab.Hive.log4net.xml" />
     <Content Include="log4net licence.txt" />
   </ItemGroup>
