Index: /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ILifecycleManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ILifecycleManager.cs	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ILifecycleManager.cs	(revision 1088)
@@ -25,13 +25,18 @@
 using System.Text;
 
-namespace HeuristicLab.Hive.Contracts.Interfaces {
+namespace HeuristicLab.Hive.Contracts.Interfaces {    
   /// <summary>
   /// Manages the lifecycle of the application
   /// </summary>
-  public interface ILifecycleManager {
+  public interface ILifecycleManager {    
     /// <summary>
     /// Initializes the application
     /// </summary>
     void Init();
+
+    /// <summary>
+    /// The server heartbeat
+    /// </summary>
+    event EventHandler OnServerHeartbeat;
 
     /// <summary>
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/CachedDataAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/CachedDataAdapter.cs	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/CachedDataAdapter.cs	(revision 1088)
@@ -52,4 +52,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected virtual RowT FindSingleRow(Selector dbSelector, 
       Selector cacheSelector) {
@@ -66,4 +67,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected virtual IEnumerable<RowT> FindMultipleRows(Selector dbSelector,
         Selector cacheSelector) {
@@ -83,4 +85,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected virtual ObjT FindSingle(Selector dbSelector,
       Selector cacheSelector) {
@@ -97,4 +100,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected virtual ICollection<ObjT> FindMultiple(Selector dbSelector,
       Selector cacheSelector) {
@@ -142,4 +146,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected override RowT GetRowById(long id) {
       RowT row =
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/DataAdapterBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/DataAdapterBase.cs	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/DataAdapterBase.cs	(revision 1088)
@@ -51,4 +51,5 @@
     protected delegate IEnumerable<RowT> Selector();
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected virtual RowT FindSingleRow(Selector selector) {
       RowT row = default(RowT);
@@ -63,4 +64,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected virtual ObjT FindSingle(Selector selector) {
       RowT row = FindSingleRow(selector);
@@ -76,4 +78,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected virtual ICollection<ObjT> FindMultiple(Selector selector) {
       IEnumerable<RowT> found =
@@ -92,4 +95,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     protected virtual RowT GetRowById(long id) {
       return FindSingleRow(
@@ -117,4 +121,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     public virtual ObjT GetById(long id) {
       return FindSingle(delegate() {
@@ -123,4 +128,5 @@
     }
 
+    [MethodImpl(MethodImplOptions.Synchronized)]
     public virtual ICollection<ObjT> GetAll() {
       return new List<ObjT>(
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/HeuristicLab.Hive.Server.ADODataAccess.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/HeuristicLab.Hive.Server.ADODataAccess.csproj	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/HeuristicLab.Hive.Server.ADODataAccess.csproj	(revision 1088)
@@ -94,4 +94,5 @@
   </ItemGroup>
   <ItemGroup>
+    <None Include="app.config" />
     <None Include="dsHiveServer.xsc">
       <DependentUpon>dsHiveServer.xsd</DependentUpon>
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/Properties/Settings.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/Properties/Settings.Designer.cs	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/Properties/Settings.Designer.cs	(revision 1088)
@@ -27,6 +27,6 @@
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)]
-        [global::System.Configuration.DefaultSettingValueAttribute("Data Source=10.22.20.84;Initial Catalog=HiveServer;Persist Security Info=True;Use" +
-            "r ID=hive;Password=hive")]
+        [global::System.Configuration.DefaultSettingValueAttribute("Data Source=10.22.20.84;Initial Catalog=HiveServer;MultipleActiveResultSets=True;" +
+            "Persist Security Info=True;User ID=hive;Password=hive")]
         public string HiveServerConnectionString {
             get {
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/Properties/Settings.settings
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/Properties/Settings.settings	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/Properties/Settings.settings	(revision 1088)
@@ -6,8 +6,8 @@
       <DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
 &lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
-  &lt;ConnectionString&gt;Data Source=10.22.20.84;Initial Catalog=HiveServer;Persist Security Info=True;User ID=hive;Password=hive&lt;/ConnectionString&gt;
+  &lt;ConnectionString&gt;Data Source=10.22.20.84;Initial Catalog=HiveServer;MultipleActiveResultSets=True;Persist Security Info=True;User ID=hive;Password=hive&lt;/ConnectionString&gt;
   &lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
 &lt;/SerializableConnectionString&gt;</DesignTimeValue>
-      <Value Profile="(Default)">Data Source=10.22.20.84;Initial Catalog=HiveServer;Persist Security Info=True;User ID=hive;Password=hive</Value>
+      <Value Profile="(Default)">Data Source=10.22.20.84;Initial Catalog=HiveServer;MultipleActiveResultSets=True;Persist Security Info=True;User ID=hive;Password=hive</Value>
     </Setting>
   </Settings>
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs	(revision 1088)
@@ -18,8 +18,10 @@
   public class ClientCommunicator: IClientCommunicator {
     int nrOfJobs = 0;
+    Dictionary<Guid, DateTime> lastHeartbeats;
 
     IClientAdapter clientAdapter;
     IJobAdapter jobAdapter;
     IJobResultsAdapter jobResultAdapter;
+    ILifecycleManager lifecycleManager;
 
     public ClientCommunicator() {
@@ -27,4 +29,8 @@
       jobAdapter = ServiceLocator.GetJobAdapter();
       jobResultAdapter = ServiceLocator.GetJobResultsAdapter();
+      lifecycleManager = ServiceLocator.GetLifecycleManager();
+
+      lifecycleManager.OnServerHeartbeat += 
+        new EventHandler(lifecycleManager_OnServerHeartbeat);
 
       for (int i = 0; i < nrOfJobs; i++) {
@@ -34,5 +40,14 @@
         jobAdapter.Update(job);
       }
+      lastHeartbeats = new Dictionary<Guid, DateTime>();
 
+    }
+
+    void lifecycleManager_OnServerHeartbeat(object sender, EventArgs e) {
+      List<ClientInfo> allClients = new List<ClientInfo>(clientAdapter.GetAll());
+
+      foreach (ClientInfo client in allClients) {
+        
+      }
     }
 
@@ -58,4 +73,10 @@
     public ResponseHB SendHeartBeat(HeartBeatData hbData) {
       ResponseHB response = new ResponseHB();
+
+      if (lastHeartbeats.ContainsKey(hbData.ClientId)) {
+        lastHeartbeats[hbData.ClientId] = DateTime.Now;
+      } else {
+        lastHeartbeats.Add(hbData.ClientId, DateTime.Now);
+      }
 
       response.Success = true;
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/LifecycleManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/LifecycleManager.cs	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/LifecycleManager.cs	(revision 1088)
@@ -26,11 +26,26 @@
 using HeuristicLab.Hive.Contracts.Interfaces;
 using HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess;
+using System.Timers;
 
 namespace HeuristicLab.Hive.Server.Core {
   class LifecycleManager: ILifecycleManager {
+    private static Timer timer =
+      new Timer();
+
     #region ILifecycleManager Members
+    public event EventHandler OnServerHeartbeat;
+
+    public LifecycleManager() {
+      timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
+    }
 
     public void Init() {
-      //nothing to do
+      timer.Interval = new TimeSpan(0, 0, 10).TotalMilliseconds; // TODO: global constant needed
+      timer.Start();
+    }
+
+    void timer_Elapsed(object sender, ElapsedEventArgs e) {
+      if (OnServerHeartbeat != null)
+        OnServerHeartbeat(this, null);
     }
 
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs	(revision 1087)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs	(revision 1088)
@@ -49,4 +49,6 @@
 
   private static IJobResultsAdapter jobResultsAdapter = null;
+
+  private static ILifecycleManager lifecycleManager = null;
 
   /// <summary>
@@ -166,3 +168,16 @@
     return jobResultsAdapter;
   }
+
+  /// <summary>
+  /// Gets the lifecycle manager
+  /// </summary>
+  /// <returns></returns>
+  [MethodImpl(MethodImplOptions.Synchronized)]
+  public static ILifecycleManager GetLifecycleManager() {
+    if (lifecycleManager == null) {
+      lifecycleManager = discoveryService.GetInstances<ILifecycleManager>()[0];
+    }
+
+    return lifecycleManager;
+  }
 }
