C# Class van.Web.MvcApplication

Inheritance: System.Web.HttpApplication
Exibir arquivo Open project: zachariahyoung/virtualaltnet

Public Methods

Method Description
Init ( ) : void

Due to issues on IIS7, the NHibernate initialization must occur in Init(). But Init() may be invoked more than once; accordingly, we introduce a thread-safe mechanism to ensure it's only initialized once. See http://msdn.microsoft.com/en-us/magazine/cc188793.aspx for explanation details.

Protected Methods

Method Description
Application_BeginRequest ( object sender, EventArgs e ) : void

Due to issues on IIS7, the NHibernate initialization cannot reside in Init() but must only be called once. Consequently, we invoke a thread-safe singleton class to ensure it's only initialized once.

Application_Error ( object sender, EventArgs e ) : void
Application_Start ( ) : void
InitializeServiceLocator ( ) : void

Instantiate the container and add all Controllers that derive from WindsorController to the container. Also associate the Controller with the WindsorContainer ControllerFactory.

Private Methods

Method Description
InitializeNHibernateSession ( ) : void

If you need to communicate to multiple databases, you'd add a line to this method to initialize the other database as well.

Method Details

Application_BeginRequest() protected method

Due to issues on IIS7, the NHibernate initialization cannot reside in Init() but must only be called once. Consequently, we invoke a thread-safe singleton class to ensure it's only initialized once.
protected Application_BeginRequest ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

Application_Error() protected method

protected Application_Error ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

Application_Start() protected method

protected Application_Start ( ) : void
return void

Init() public method

Due to issues on IIS7, the NHibernate initialization must occur in Init(). But Init() may be invoked more than once; accordingly, we introduce a thread-safe mechanism to ensure it's only initialized once. See http://msdn.microsoft.com/en-us/magazine/cc188793.aspx for explanation details.
public Init ( ) : void
return void

InitializeServiceLocator() protected method

Instantiate the container and add all Controllers that derive from WindsorController to the container. Also associate the Controller with the WindsorContainer ControllerFactory.
protected InitializeServiceLocator ( ) : void
return void