Concrete implementation of a SessionFactory.

Namespace: NHibernate.Impl
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)

Syntax

C#
[SerializableAttribute]
public sealed class SessionFactoryImpl : ISessionFactoryImplementor, 
	IMapping, ISessionFactory, IDisposable, IObjectReference
Visual Basic
<SerializableAttribute> _
Public NotInheritable Class SessionFactoryImpl _
	Implements ISessionFactoryImplementor, IMapping, ISessionFactory, IDisposable,  _
	IObjectReference
Visual C++
[SerializableAttribute]
public ref class SessionFactoryImpl sealed : ISessionFactoryImplementor, 
	IMapping, ISessionFactory, IDisposable, IObjectReference

Remarks

Has the following responsibilities: Caches configuration settings (immutably) Caches "compiled" mappings - ie. IEntityPersister and ICollectionPersister Caches "compiled" queries (memory sensitive cache) Manages PreparedStatements/IDbCommands - how true in NH? Delegates IDbConnection management to the IConnectionProvider Factory for instances of ISession

This class must appear immutable to clients, even if it does all kinds of caching and pooling under the covers. It is crucial that the class is not only thread safe , but also highly concurrent. Synchronization must be used extremely sparingly.

Inheritance Hierarchy

System..::..Object
  NHibernate.Impl..::..SessionFactoryImpl

See Also