Index: trunk/sources/HeuristicLab.DataAccess/DBSynchronizer.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/DBSynchronizer.cs	(revision 1449)
+++ 	(revision )
@@ -1,57 +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.Text;
-using System.Timers;
-using HeuristicLab.DataAccess.Interfaces;
-
-namespace HeuristicLab.DataAccess {
-  class DBSynchronizer: IDBSynchronizer {
-    private Timer timer =
-      new Timer();
-
-    void timer_Elapsed(object sender, ElapsedEventArgs e) {
-      UpdateDB();
-    }
-
-    #region IDBSynchronizer Members
-    public event EventHandler OnUpdate;
-
-    public void EnableAutoUpdate(TimeSpan interval) {
-      timer.Interval = interval.TotalMilliseconds;
-      timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
-      timer.Start();
-    }
-
-    public void DisableAutoUpdate() {
-      timer.Stop();
-    }
-
-    public void UpdateDB() {
-      if (OnUpdate != null)
-        OnUpdate(this, null);
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.DataAccess/HeuristicLab.DataAccess.csproj
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/HeuristicLab.DataAccess.csproj	(revision 1449)
+++ trunk/sources/HeuristicLab.DataAccess/HeuristicLab.DataAccess.csproj	(revision 1468)
@@ -80,10 +80,11 @@
   <ItemGroup>
     <Compile Include="DataAccessPlugin.cs" />
-    <Compile Include="Interfaces\IDBSynchronizer.cs" />
+    <Compile Include="Interfaces\ISession.cs" />
+    <Compile Include="Interfaces\ISessionFactory.cs" />
+    <Compile Include="Interfaces\ITransaction.cs" />
+    <Compile Include="Interfaces\ITransactionManager.cs" />
     <Compile Include="PersistableObject.cs" />
-    <Compile Include="Interfaces\ICachedDataAdapter.cs" />
     <Compile Include="Interfaces\IDataAdapter.cs" />
     <Compile Include="Interfaces\IPersistableObject.cs" />
-    <Compile Include="DBSynchronizer.cs" />
   </ItemGroup>
   <ItemGroup>
@@ -139,7 +140,9 @@
   <ItemGroup>
     <Reference Include="System" />
+    <Reference Include="System.Data" />
     <Reference Include="System.Runtime.Serialization">
       <RequiredTargetFramework>3.0</RequiredTargetFramework>
     </Reference>
+    <Reference Include="System.Xml" />
   </ItemGroup>
 </Project>
Index: trunk/sources/HeuristicLab.DataAccess/Interfaces/ICachedDataAdapter.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/Interfaces/ICachedDataAdapter.cs	(revision 1449)
+++ 	(revision )
@@ -1,32 +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.Text;
-using System.Runtime.CompilerServices;
-
-namespace HeuristicLab.DataAccess.Interfaces {
-  public interface ICachedDataAdapter {
-    [MethodImpl(MethodImplOptions.Synchronized)]
-    void SyncWithDb();
-  }
-}
Index: trunk/sources/HeuristicLab.DataAccess/Interfaces/IDBSynchronizer.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/Interfaces/IDBSynchronizer.cs	(revision 1449)
+++ 	(revision )
@@ -1,52 +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.Text;
-
-namespace HeuristicLab.DataAccess.Interfaces {
-  /// <summary>
-  /// Transaction manager for the DB access layer
-  /// </summary>
-  public interface IDBSynchronizer {
-    /// <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.DataAccess/Interfaces/IDataAdapter.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/Interfaces/IDataAdapter.cs	(revision 1449)
+++ trunk/sources/HeuristicLab.DataAccess/Interfaces/IDataAdapter.cs	(revision 1468)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Text;
+using System.Data.Common;
 
 namespace HeuristicLab.DataAccess.Interfaces {
@@ -52,4 +53,9 @@
     /// <param name="user"></param>
     bool Delete(ObjT obj);
+
+    /// <summary>
+    /// sets the session
+    /// </summary>
+    ISession Session { set; }
   }
 }
Index: trunk/sources/HeuristicLab.DataAccess/Interfaces/ISession.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/Interfaces/ISession.cs	(revision 1468)
+++ trunk/sources/HeuristicLab.DataAccess/Interfaces/ISession.cs	(revision 1468)
@@ -0,0 +1,44 @@
+﻿#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.Text;
+using System.Data.Common;
+
+namespace HeuristicLab.DataAccess.Interfaces {
+  public interface ISession {
+    ITransaction BeginTransaction();
+
+    ITransaction GetTransactionForCurrentThread();
+
+    IDataAdapter<ObjT> GetDataAdapter<ObjT>()
+      where ObjT : IPersistableObject;
+
+    T GetDataAdapter<ObjT, T>()
+      where ObjT : IPersistableObject
+      where T : class, IDataAdapter<ObjT>;
+
+    DbConnection Connection { get; }
+
+    void EndSession();
+  }
+}
Index: trunk/sources/HeuristicLab.DataAccess/Interfaces/ISessionFactory.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/Interfaces/ISessionFactory.cs	(revision 1468)
+++ trunk/sources/HeuristicLab.DataAccess/Interfaces/ISessionFactory.cs	(revision 1468)
@@ -0,0 +1,33 @@
+﻿#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.Text;
+
+namespace HeuristicLab.DataAccess.Interfaces {
+  public interface ISessionFactory {
+    ISession GetSessionForCurrentThread();
+
+    Type DbConnectionType { set; }
+    String DbConnectionString { set; }
+  }
+}
Index: trunk/sources/HeuristicLab.DataAccess/Interfaces/ITransaction.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/Interfaces/ITransaction.cs	(revision 1468)
+++ trunk/sources/HeuristicLab.DataAccess/Interfaces/ITransaction.cs	(revision 1468)
@@ -0,0 +1,34 @@
+﻿#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.Text;
+using System.Data.Common;
+
+namespace HeuristicLab.DataAccess.Interfaces {
+  public interface ITransaction {
+    void Commit();
+    void Rollback();
+
+    object InnerTransaction { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.DataAccess/Interfaces/ITransactionManager.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/Interfaces/ITransactionManager.cs	(revision 1468)
+++ trunk/sources/HeuristicLab.DataAccess/Interfaces/ITransactionManager.cs	(revision 1468)
@@ -0,0 +1,31 @@
+﻿#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.Text;
+
+namespace HeuristicLab.DataAccess.Interfaces {
+  public interface ITransactionManager {
+    ITransaction BeginTransaction();
+    ITransaction GetTransactionForCurrentThread(); 
+  }
+}
