Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateTransactionManager Class

PlatformTransactionManager implementation for a single Hibernate SessionFactory. Binds a Hibernate Session from the specified factory to the thread, potentially allowing for one thread Session per factory

For a list of all members of this type, see HibernateTransactionManager Members .

System.Object
   AbstractPlatformTransactionManager
      HibernateTransactionManager

[Visual Basic]
Public Class HibernateTransactionManager
    Inherits AbstractPlatformTransactionManager
    Implements IResourceTransactionManager, IObjectFactoryAware, IInitializingObject
[C#]
public class HibernateTransactionManager : AbstractPlatformTransactionManager, IResourceTransactionManager, IObjectFactoryAware, IInitializingObject

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

SessionFactoryUtils and HibernateTemplate are aware of thread-bound Sessions and participate in such transactions automatically. Using either of those is required for Hibernate access code that needs to support this transaction handling mechanism.

Supports custom isolation levels at the start of the transaction , and timeouts that get applied as appropriate Hibernate query timeouts. To support the latter, application code must either use

HibernateTemplate
(which by default applies the timeouts) or call
SessionFactoryUtils.applyTransactionTimeout
for each created Hibernate Query object.

Note that you can specify a Spring IDbProvider instance which if shared with a corresponding instance of AdoTemplate will allow for mixing ADO.NET/NHibernate operations within a single transaction.

Requirements

Namespace: Spring.Data.NHibernate

Assembly: Spring.Data.NHibernate20 (in Spring.Data.NHibernate20.dll)

See Also

HibernateTransactionManager Members | Spring.Data.NHibernate Namespace