Index: trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterBase.cs	(revision 1487)
+++ trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterBase.cs	(revision 1488)
@@ -144,5 +144,5 @@
     protected ObjT FindSingle(Selector selector) {
       ITransaction trans =
-       session.GetTransactionForCurrentThread();
+       session.GetCurrentTransaction();
       bool transactionExists = trans != null;
       if (!transactionExists) {
@@ -174,5 +174,5 @@
     protected ICollection<ObjT> FindMultiple(Selector selector) {
       ITransaction trans =
-       session.GetTransactionForCurrentThread();
+       session.GetCurrentTransaction();
       bool transactionExists = trans != null;
       if (!transactionExists) {
@@ -242,5 +242,5 @@
     public void Update(ObjT obj) {
       ITransaction trans =
-        session.GetTransactionForCurrentThread();
+        session.GetCurrentTransaction();
       bool transactionExists = trans != null;
       if (!transactionExists) {
@@ -294,5 +294,5 @@
     public bool Delete(ObjT obj) {
       ITransaction trans =
-        session.GetTransactionForCurrentThread();
+        session.GetCurrentTransaction();
       bool transactionExists = trans != null;
       if (!transactionExists) {
Index: trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterWrapperBase.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterWrapperBase.cs	(revision 1487)
+++ trunk/sources/HeuristicLab.DataAccess.ADOHelper/DataAdapterWrapperBase.cs	(revision 1488)
@@ -43,5 +43,5 @@
       get {
         ITransaction trans =
-          session.GetTransactionForCurrentThread();
+          session.GetCurrentTransaction();
         if (trans != null)
           SetTransaction(trans.InnerTransaction as DbTransaction);
Index: trunk/sources/HeuristicLab.DataAccess.ADOHelper/HeuristicLab.DataAccess.ADOHelper.csproj
===================================================================
--- trunk/sources/HeuristicLab.DataAccess.ADOHelper/HeuristicLab.DataAccess.ADOHelper.csproj	(revision 1487)
+++ trunk/sources/HeuristicLab.DataAccess.ADOHelper/HeuristicLab.DataAccess.ADOHelper.csproj	(revision 1488)
@@ -88,5 +88,4 @@
     <Compile Include="SessionFactory.cs" />
     <Compile Include="Transaction.cs" />
-    <Compile Include="TransactionManager.cs" />
   </ItemGroup>
   <ItemGroup>
Index: trunk/sources/HeuristicLab.DataAccess.ADOHelper/Session.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess.ADOHelper/Session.cs	(revision 1487)
+++ trunk/sources/HeuristicLab.DataAccess.ADOHelper/Session.cs	(revision 1488)
@@ -35,5 +35,5 @@
     private SessionFactory factory;
 
-    private ITransactionManager transManager;
+    private Transaction transaction;
 
     private DbConnection connection;
@@ -42,8 +42,6 @@
       new Dictionary<Guid, object>();
 
-    public Session(SessionFactory factory, 
-      ITransactionManager transManager) {
+    public Session(SessionFactory factory) {
       this.factory = factory;
-      this.transManager = transManager;
     }
 
@@ -58,37 +56,36 @@
     }
 
+    public void DetachTrasaction() {
+      this.transaction = null;
+    }
+
     #region ISession Members
     public ITransaction BeginTransaction() {
-      ITransaction trans = transManager.BeginTransaction();
-      if(trans is Transaction)
-        ((Transaction)trans).Connection = Connection;
+      if (transaction == null) {
+         transaction = new Transaction(this);
+         transaction.Connection = Connection;
+      }
 
-      return trans;
+      return transaction;
     }
 
-    public ITransaction GetTransactionForCurrentThread() {
-      ITransaction trans = transManager.GetTransactionForCurrentThread();
-      if (trans != null && trans is Transaction)
-        ((Transaction)trans).Connection = Connection;
-
-      return trans;
+    public ITransaction GetCurrentTransaction() {
+      return transaction;
     }
 
     public IDataAdapter<ObjT> GetDataAdapter<ObjT>()
       where ObjT : IPersistableObject {
-      lock(this) {
-        Guid adapterId = typeof(IDataAdapter<ObjT>).GUID;
+      Guid adapterId = typeof(IDataAdapter<ObjT>).GUID;
 
-        if (!adapters.ContainsKey(adapterId)) {
-          IDataAdapter<ObjT> adapter =
-            discoveryService.GetInstances<IDataAdapter<ObjT>>()[0];
+      if (!adapters.ContainsKey(adapterId)) {
+        IDataAdapter<ObjT> adapter =
+          discoveryService.GetInstances<IDataAdapter<ObjT>>()[0];
 
-          adapter.Session = this;
+        adapter.Session = this;
 
-          adapters.Add(adapterId, adapter);
-        }
+        adapters.Add(adapterId, adapter);
+      }
 
-        return adapters[adapterId] as IDataAdapter<ObjT>;
-      }
+      return adapters[adapterId] as IDataAdapter<ObjT>;
     }
 
@@ -97,5 +94,4 @@
       where T : class, IDataAdapter<ObjT>
     {
-      lock (this) {
         Guid adapterId = typeof(T).GUID;
 
@@ -110,10 +106,15 @@
 
         return adapters[adapterId] as T;
-      }
     }
 
     public void EndSession() {
-      if(connection.State == System.Data.ConnectionState.Open)
+      if (transaction != null) {
+        transaction.Rollback();
+        transaction = null;
+      }
+      if (connection.State == System.Data.ConnectionState.Open) {
         connection.Close();
+        connection = null;
+      }
       factory.EndSession(this);
     }
Index: trunk/sources/HeuristicLab.DataAccess.ADOHelper/SessionFactory.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess.ADOHelper/SessionFactory.cs	(revision 1487)
+++ trunk/sources/HeuristicLab.DataAccess.ADOHelper/SessionFactory.cs	(revision 1488)
@@ -33,7 +33,4 @@
     private IDictionary<Thread, ISession> sessions =
       new Dictionary<Thread, ISession>();
-
-    private ITransactionManager transManager =
-          new TransactionManager();
 
     public Type DbConnectionType { get;  set; }
@@ -86,5 +83,5 @@
         if (!sessions.ContainsKey(current)) {
           sessions[current] =
-            new Session(this, transManager);
+            new Session(this);
         }
 
Index: trunk/sources/HeuristicLab.DataAccess.ADOHelper/Transaction.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess.ADOHelper/Transaction.cs	(revision 1487)
+++ trunk/sources/HeuristicLab.DataAccess.ADOHelper/Transaction.cs	(revision 1488)
@@ -31,12 +31,12 @@
   class Transaction: ITransaction {
     private DbTransaction transaction;
-    private TransactionManager manager;
+
+    private Session session;
+
+    public Transaction(Session session) {
+      this.session = session;
+    }
 
     #region ITransaction Members
-
-    public Transaction(TransactionManager manager) {
-      this.manager = manager;
-    }
-
     public DbConnection Connection {
       set {
@@ -54,5 +54,4 @@
 
     public void Commit() {
-      manager.RemoveTransaction(this);
       if (transaction != null) {
         DbConnection conn =
@@ -60,4 +59,7 @@
 
         transaction.Commit();
+
+        transaction = null;
+        session.DetachTrasaction();
 
         if (conn != null && 
@@ -68,13 +70,17 @@
 
     public void Rollback() {
-      manager.RemoveTransaction(this);
-      DbConnection conn =
-          transaction.Connection;
+      if (transaction != null) {
+        DbConnection conn =
+            transaction.Connection;
 
-      transaction.Rollback();
+        transaction.Rollback();
 
-      if (conn != null &&
-          conn.State == System.Data.ConnectionState.Open)
-        conn.Close();
+        transaction = null;
+        session.DetachTrasaction();
+
+        if (conn != null &&
+            conn.State == System.Data.ConnectionState.Open)
+          conn.Close();
+      }
     }
 
Index: trunk/sources/HeuristicLab.DataAccess.ADOHelper/TransactionManager.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess.ADOHelper/TransactionManager.cs	(revision 1487)
+++ 	(revision )
@@ -1,117 +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 System.Timers;
-using HeuristicLab.DataAccess.Interfaces;
-using System.Threading;
-using System.Data;
-
-namespace HeuristicLab.DataAccess.ADOHelper {
-  class TransactionManager: ITransactionManager {
-    private IDictionary<Thread, ITransaction> transactions =
-      new Dictionary<Thread, ITransaction>();
-
-    public TransactionManager() {
-      System.Timers.Timer timer =
-        new System.Timers.Timer();
-
-      TimeSpan interval =
-        new TimeSpan(0, 1, 0);
-
-      timer.Interval = interval.TotalMilliseconds;
-      timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
-      timer.Start();
-    }
-
-    void timer_Elapsed(object sender, ElapsedEventArgs e) {
-      lock (this) {
-        ICollection<Thread> tobeRemoved =
-          new List<Thread>();
-
-        foreach (Thread t in transactions.Keys) {
-          if (t.ThreadState == ThreadState.Stopped) {
-            try {
-              transactions[t].Rollback();
-            }
-            catch (Exception ex) {
-              //TODO: Error handling
-            }
-            finally {
-              tobeRemoved.Add(t);
-            }
-          }
-        }
-
-        foreach (Thread t in tobeRemoved) {
-          transactions.Remove(t);
-        }
-      }
-    }
-
-    #region ITransactionManager Members
-    public ITransaction BeginTransaction() {
-      lock (this) {
-        Thread current = Thread.CurrentThread;
-
-        if (!transactions.ContainsKey(current)) {
-          ITransaction trans = new Transaction(this);
-          transactions[current] = trans;
-        }
-
-        return transactions[current];
-      }
-    }
-
-    public ITransaction GetTransactionForCurrentThread() {
-      lock (this) {
-        Thread current = Thread.CurrentThread;
-
-        if(transactions.ContainsKey(current))
-          return transactions[current];
-        else
-          return null;
-      }
-    }
-
-    internal void RemoveTransaction(ITransaction trans) {
-      lock (this) {
-        ICollection<Thread> tobeRemoved =
-          new List<Thread>();
-
-        foreach (Thread t in transactions.Keys) {
-          if (transactions[t].Equals(trans)) {
-            tobeRemoved.Add(t);
-          }
-        }
-
-        foreach (Thread t in tobeRemoved) {
-          transactions.Remove(t);
-        }
-      }
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.DataAccess/Interfaces/ISession.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAccess/Interfaces/ISession.cs	(revision 1487)
+++ trunk/sources/HeuristicLab.DataAccess/Interfaces/ISession.cs	(revision 1488)
@@ -29,5 +29,5 @@
     ITransaction BeginTransaction();
 
-    ITransaction GetTransactionForCurrentThread();
+    ITransaction GetCurrentTransaction();
 
     IDataAdapter<ObjT> GetDataAdapter<ObjT>()
Index: trunk/sources/HeuristicLab.Security.DataAccess/Properties/AssemblyInfo.frame
===================================================================
--- trunk/sources/HeuristicLab.Security.DataAccess/Properties/AssemblyInfo.frame	(revision 1487)
+++ trunk/sources/HeuristicLab.Security.DataAccess/Properties/AssemblyInfo.frame	(revision 1488)
@@ -28,5 +28,5 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
-[assembly: AssemblyTitle("HeuristicLab.Security.DataAccess)]
+[assembly: AssemblyTitle("HeuristicLab.Security.DataAccess")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
