From 1d42e7cc891403b5f20eb67bc08f23a667019402 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 24 Aug 2011 13:42:04 +0200 Subject: Add support for transaction multiplexing Also delay getting a connection until after we do all the sanity checks (e.g., that there is no active transaction). Otherwise we are running risk of getting blocked rather than throwing an exception. --- odb/tracer/connection.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'odb/tracer/connection.cxx') diff --git a/odb/tracer/connection.cxx b/odb/tracer/connection.cxx index 516e36a..54c233c 100644 --- a/odb/tracer/connection.cxx +++ b/odb/tracer/connection.cxx @@ -27,11 +27,7 @@ namespace odb transaction_impl* connection:: begin () { - if (odb::transaction::has_current ()) - throw already_in_transaction (); - - return new transaction_impl ( - connection_ptr (inc_ref (this))); + return new transaction_impl (connection_ptr (inc_ref (this))); } } } -- cgit v1.1