C# Class Spring.Data.NHibernate.Support.SessionScope.LazySessionHolder

This sessionHolder creates a default session only if it is needed.
Although a NHibernateSession deferes creation of db-connections until they are really needed, instantiation a session is imho still more expensive than this LazySessionHolder. (EE)
Inheritance: SessionHolder
Mostrar archivo Open project: spring-projects/spring-net

Public Methods

Method Description
Close ( ) : void

Ensure session is closed (if any) and remove circular references to avoid memory leaks!

LazySessionHolder ( SessionScope owner ) : System

Initialize a new instance.

Protected Methods

Method Description
EnsureInitialized ( ) : void

Create a new session on demand

Method Details

Close() public method

Ensure session is closed (if any) and remove circular references to avoid memory leaks!
public Close ( ) : void
return void

EnsureInitialized() protected method

Create a new session on demand
protected EnsureInitialized ( ) : void
return void

LazySessionHolder() public method

Initialize a new instance.
public LazySessionHolder ( SessionScope owner ) : System
owner SessionScope
return System