Index: /trunk/sources/HeuristicLab.Hive.Contracts/HeuristicLab.Hive.Contracts.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Contracts/HeuristicLab.Hive.Contracts.csproj	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Contracts/HeuristicLab.Hive.Contracts.csproj	(revision 948)
@@ -89,4 +89,5 @@
     <Compile Include="Interfaces\ILifecycleManager.cs" />
     <Compile Include="Interfaces\IServerConsoleFacade.cs" />
+    <Compile Include="Interfaces\ITransactionManager.cs" />
     <Compile Include="Interfaces\IUserRoleManager.cs" />
     <Compile Include="JobBase.cs" />
Index: /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ILifecycleManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ILifecycleManager.cs	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ILifecycleManager.cs	(revision 948)
@@ -36,7 +36,13 @@
 
     /// <summary>
+    /// Gets the transaction manager
+    /// </summary>
+    /// <returns></returns>
+    ITransactionManager GetTransactionManager();
+
+    /// <summary>
     /// Shuts the application down
     /// </summary>
-    void Shtudown();
+    void Shutdown();
   }
 }
Index: /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ITransactionManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ITransactionManager.cs	(revision 948)
+++ /trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ITransactionManager.cs	(revision 948)
@@ -0,0 +1,32 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.Hive.Contracts.Interfaces {
+  /// <summary>
+  /// Transaction manager for the DB access layer
+  /// </summary>
+  public interface ITransactionManager {
+    /// <summary>
+    /// This event is fired when an update occurs
+    /// </summary>
+    event EventHandler OnUpdate; 
+
+    /// <summary>
+    /// Enables the auto update of the DB
+    /// </summary>
+    /// <param name="interval"></param>
+    void EnableAutoUpdate(TimeSpan interval);
+
+    /// <summary>
+    /// Disables the auto update of the DB
+    /// </summary>
+    void DisableAutoUpdate();
+
+    /// <summary>
+    /// Update the DB from the cache
+    /// </summary>
+    void UpdateDB();
+  }
+}
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs	(revision 948)
@@ -37,6 +37,14 @@
       new dsHiveServer.ClientDataTable();
 
-    private IResourceAdapter resAdapter =
-      ServiceLocator.GetResourceAdapter();
+    private IResourceAdapter resAdapter = null;
+
+    private IResourceAdapter ResAdapter {
+      get {
+        if (resAdapter == null)
+          resAdapter = ServiceLocator.GetResourceAdapter();
+
+        return resAdapter;
+      }
+    }
 
     public ClientAdapter() {
@@ -53,5 +61,5 @@
         /*Parent - resource*/
         client.ResourceId = row.ResourceId;
-        resAdapter.GetResourceById(client);
+        ResAdapter.GetResourceById(client);
 
         /*ClientInfo*/
@@ -115,5 +123,5 @@
     public void UpdateClient(ClientInfo client) {
       if (client != null) {
-        resAdapter.UpdateResource(client);
+        ResAdapter.UpdateResource(client);
 
         dsHiveServer.ClientRow row = 
@@ -179,5 +187,5 @@
           data.RemoveClientRow(row);
 
-          return resAdapter.DeleteResource(client);
+          return ResAdapter.DeleteResource(client);
         }
       }
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/TransactionManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/TransactionManager.cs	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/TransactionManager.cs	(revision 948)
@@ -26,4 +26,5 @@
 using HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess;
 using System.Timers;
+using HeuristicLab.Hive.Contracts.Interfaces;
 
 namespace HeuristicLab.Hive.Server.ADODataAccess {
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserAdapter.cs	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserAdapter.cs	(revision 948)
@@ -37,8 +37,26 @@
         new dsHiveServer.HiveUserDataTable();
 
-    private IPermissionOwnerAdapter permOwnerAdapter =
-       ServiceLocator.GetPermissionOwnerAdapter();
+    private IPermissionOwnerAdapter permOwnerAdapter = null;
+
+    private IPermissionOwnerAdapter PermOwnerAdapter {
+      get {
+        if (permOwnerAdapter == null)
+          permOwnerAdapter = ServiceLocator.GetPermissionOwnerAdapter();
+
+        return permOwnerAdapter;
+      }
+    }
 
     private IUserGroupAdapter userGroupAdapter = null;
+
+    private IUserGroupAdapter UserGroupAdapter {
+      get {
+        if(userGroupAdapter == null) {
+          userGroupAdapter = ServiceLocator.GetUserGroupAdapter();
+        }
+
+        return userGroupAdapter;
+      }
+    }
 
     public UserAdapter() {
@@ -55,5 +73,5 @@
         /*Parent - PermissionOwner*/
         user.PermissionOwnerId = row.PermissionOwnerId;
-        permOwnerAdapter.GetPermissionOwnerById(user);
+        PermOwnerAdapter.GetPermissionOwnerById(user);
 
         /*User*/
@@ -83,5 +101,5 @@
     public void UpdateUser(User user) {
       if (user != null) {
-        permOwnerAdapter.UpdatePermissionOwner(user);
+        PermOwnerAdapter.UpdatePermissionOwner(user);
 
         dsHiveServer.HiveUserRow row = 
@@ -116,5 +134,5 @@
 
       PermissionOwner permOwner =
-        permOwnerAdapter.GetPermissionOwnerByName(name);
+        PermOwnerAdapter.GetPermissionOwnerByName(name);
 
       if (permOwner != null) {
@@ -152,19 +170,15 @@
 
         if (row != null) {
-          if (userGroupAdapter == null)
-            userGroupAdapter =
-              ServiceLocator.GetUserGroupAdapter();
-
           ICollection<UserGroup> userGroups =
-            userGroupAdapter.MemberOf(user);
+            UserGroupAdapter.MemberOf(user);
 
           foreach (UserGroup group in userGroups) {
             group.Members.Remove(user);
-            userGroupAdapter.UpdateUserGroup(group);
+            UserGroupAdapter.UpdateUserGroup(group);
           }
 
           data.RemoveHiveUserRow(row);
 
-          return permOwnerAdapter.DeletePermissionOwner(user);
+          return PermOwnerAdapter.DeletePermissionOwner(user);
         }
       }
Index: /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserGroupAdapter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserGroupAdapter.cs	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/UserGroupAdapter.cs	(revision 948)
@@ -44,9 +44,25 @@
       new dsHiveServer.PermissionOwner_UserGroupDataTable();
 
-    private IPermissionOwnerAdapter permOwnerAdapter =
-      ServiceLocator.GetPermissionOwnerAdapter();
-
-    private IUserAdapter userAdapter =
-      ServiceLocator.GetUserAdapter();
+    private IPermissionOwnerAdapter permOwnerAdapter = null;
+
+    private IPermissionOwnerAdapter PermOwnerAdapter {
+      get {
+        if (permOwnerAdapter == null)
+          permOwnerAdapter = ServiceLocator.GetPermissionOwnerAdapter();
+
+        return permOwnerAdapter;
+      }
+    }
+
+    private IUserAdapter userAdapter = null;
+
+    private IUserAdapter UserAdapter {
+      get {
+        if (userAdapter == null)
+          userAdapter = ServiceLocator.GetUserAdapter();
+
+        return userAdapter;
+      }
+    }
 
     public UserGroupAdapter() {
@@ -65,5 +81,5 @@
         /*Parent - Permission Owner*/
         userGroup.PermissionOwnerId = row.PermissionOwnerId;
-        permOwnerAdapter.GetPermissionOwnerById(userGroup);
+        PermOwnerAdapter.GetPermissionOwnerById(userGroup);
 
         //first check for created references
@@ -88,5 +104,5 @@
           if (permOwner == null) {
             PermissionOwner permissionOwner = 
-              userAdapter.GetUserById(permOwnerUserGroupRow.PermissionOwnerId);
+              UserAdapter.GetUserById(permOwnerUserGroupRow.PermissionOwnerId);
 
             if (permissionOwner == null) {
@@ -133,5 +149,5 @@
           //first update the member to make sure it exists in the DB
           if (permOwner is User) {
-            userAdapter.UpdateUser(permOwner as User);
+            UserAdapter.UpdateUser(permOwner as User);
           } else if (permOwner is UserGroup) {
             UpdateUserGroup(permOwner as UserGroup);
@@ -201,5 +217,5 @@
     public void UpdateUserGroup(UserGroup group) {
       if (group != null) {
-        permOwnerAdapter.UpdatePermissionOwner(group);
+        PermOwnerAdapter.UpdatePermissionOwner(group);
 
         dsHiveServer.UserGroupRow row =
@@ -292,5 +308,5 @@
           
           data.RemoveUserGroupRow(row);
-          return permOwnerAdapter.DeletePermissionOwner(group);
+          return PermOwnerAdapter.DeletePermissionOwner(group);
         }
       }
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/HeuristicLab.Hive.Server.Core.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/HeuristicLab.Hive.Server.Core.csproj	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/HeuristicLab.Hive.Server.Core.csproj	(revision 948)
@@ -75,5 +75,4 @@
     <Compile Include="InternalInterfaces\DataAccess\IPermissionOwnerAdapter.cs" />
     <Compile Include="InternalInterfaces\DataAccess\IResourceAdapter.cs" />
-    <Compile Include="InternalInterfaces\DataAccess\ITransactionManager.cs" />
     <Compile Include="InternalInterfaces\DataAccess\IUserAdapter.cs" />
     <Compile Include="InternalInterfaces\DataAccess\IUserGroupAdapter.cs" />
Index: unk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/ITransactionManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/InternalInterfaces/DataAccess/ITransactionManager.cs	(revision 947)
+++ 	(revision )
@@ -1,32 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess {
-  /// <summary>
-  /// Transaction manager for the DB access layer
-  /// </summary>
-  public interface ITransactionManager {
-    /// <summary>
-    /// This event is fired when an update occurs
-    /// </summary>
-    event EventHandler OnUpdate; 
-
-    /// <summary>
-    /// Enables the auto update of the DB
-    /// </summary>
-    /// <param name="interval"></param>
-    void EnableAutoUpdate(TimeSpan interval);
-
-    /// <summary>
-    /// Disables the auto update of the DB
-    /// </summary>
-    void DisableAutoUpdate();
-
-    /// <summary>
-    /// Update the DB from the cache
-    /// </summary>
-    void UpdateDB();
-  }
-}
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/LifecycleManager.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/LifecycleManager.cs	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/LifecycleManager.cs	(revision 948)
@@ -25,4 +25,5 @@
 using System.Text;
 using HeuristicLab.Hive.Contracts.Interfaces;
+using HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess;
 
 namespace HeuristicLab.Hive.Server.Core {
@@ -34,5 +35,9 @@
     }
 
-    public void Shtudown() {
+    public ITransactionManager GetTransactionManager() {
+      return ServiceLocator.GetTransactionManager();
+    }
+
+    public void Shutdown() {
       ServiceLocator.GetTransactionManager().UpdateDB();
     }
Index: /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Server.Core/ServiceLocator.cs	(revision 948)
@@ -23,4 +23,5 @@
 using HeuristicLab.PluginInfrastructure;
 using System.Runtime.CompilerServices;
+using HeuristicLab.Hive.Contracts.Interfaces;
 
 /// <summary>
Index: /trunk/sources/HeuristicLab.Hive.Server/HiveServerApplication.cs
===================================================================
--- /trunk/sources/HeuristicLab.Hive.Server/HiveServerApplication.cs	(revision 947)
+++ /trunk/sources/HeuristicLab.Hive.Server/HiveServerApplication.cs	(revision 948)
@@ -147,4 +147,7 @@
 
         lifecycleManager.Init();
+        //sync with db every 5 minutes
+        lifecycleManager.GetTransactionManager().EnableAutoUpdate(
+          new TimeSpan(0, 5, 0));
 
         Form mainForm = new MainForm(clientCommunicator.BaseAddresses[0],
@@ -153,5 +156,5 @@
          Application.Run(mainForm);
 
-         lifecycleManager.Shtudown();
+         lifecycleManager.Shutdown();
       }
 
