From 032032ec21d57ae8a768d2a234bab6e81828296e Mon Sep 17 00:00:00 2001 From: sbohlen Date: Fri, 29 Oct 2010 15:30:13 +0000 Subject: [PATCH] SPRNET-1382 Added comments to section 12.2.2 re: Transaction Management with NHibernate --- doc/reference/src/orm.xml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/reference/src/orm.xml b/doc/reference/src/orm.xml index cc6f8135..2c69a592 100644 --- a/doc/reference/src/orm.xml +++ b/doc/reference/src/orm.xml @@ -237,13 +237,26 @@ SessionFactory set up. The second strategy is to use the class - Sping.Data.TxScopeTransactionManager that uses .NET + Spring.Data.TxScopeTransactionManager that uses .NET 2.0 System.Transaction namespace and its corresponding TransactionScope API. This is preferred when you are using multiple transactional - resources, such as multiple databases. + resources, such as multiple databases. Note that due to changes in the + manner in which NHibernate manages its own transactions introduced in + NHibernate 2.1.2 (and later), when using NHibernate 2.1.2 (and later) in + the context of the .NET System.Transaction class and its + TransactionScope API Spring.NET users are advised to use the + Spring.Data.HibernateTxScopeTransactionManager class + which is specifically designed to manage the new NHibernate + transcational model when used in the context of the System.Transaction + API. The API of the + Spring.Data.HibernateTxScopeTransactionManager class + is functionally equivalent to that of the + Spring.Data.HibernateTransactionManager class but it + is designed to cooperate with the .NET System.Transaction + TransactionScope API for NHibernate 2.1.2 (and later). - Both strategies associate one Hibernate Session for the scope of - the transaction (scope in the general demarcation sense, not + All of these strategies associate one Hibernate Session for the + scope of the transaction (scope in the general demarcation sense, not System.Transaction sense). If there is no transaction then a new Session will be opened for each operation. The exception to this rule is when using the OpenSessionInViewModule in a web