Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

LocalSessionFactoryObject Class

An IFactoryObject that creates a local Hibernate SessionFactory instance. Behaves like a SessionFactory instance when used as bean reference, e.g. for HibernateTemplate's "SessionFactory" property.

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

System.Object
   LocalSessionFactoryObject

[Visual Basic]
Public Class LocalSessionFactoryObject
    Implements IFactoryObject, IInitializingObject, IPersistenceExceptionTranslator, IDisposable
[C#]
public class LocalSessionFactoryObject : IFactoryObject, IInitializingObject, IPersistenceExceptionTranslator, IDisposable

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

The typical usage will be to register this as singleton factory in an application context and give objects references to application services that need it.

Hibernate configuration settings can be set using the IDictionary property 'HibernateProperties'.

This class implements the IPersistenceExceptionTranslator interface, as autodetected by Spring's PersistenceExceptionTranslationPostProcessor for AOP-based translation of PersistenceExceptionTranslationPostProcessor. Hence, the presence of e.g. LocalSessionFactoryBean automatically enables a PersistenceExceptionTranslationPostProcessor to translate Hibernate exceptions.

Requirements

Namespace: Spring.Data.NHibernate

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

See Also

LocalSessionFactoryObject Members | Spring.Data.NHibernate Namespace