Yes, it's safe. See http://stackoverflow.com/questions/2776233/does-application-start-block-all-incoming-requests for further explanation and reference.
-- Mauricio On Fri, Jun 15, 2012 at 4:09 PM, Scott McFadden < [email protected]> wrote: > I noticed in the windsor tutorial that Application_Start is an instance > method that is setting static IWindsorContainer container. I typically > see static methods initializing static variables. Is it safe for an > instance method (Application_Start) to initialize a static variable > (IWindsorContainer > container)? > > Thanks for the help Mauricio. > > > On Fri, Jun 15, 2012 at 9:45 AM, Mauricio Scheffer < > [email protected]> wrote: > >> Application_Start and Application_End respectively. See >> http://docs.castleproject.org/Windsor.Windsor-tutorial-part-four-putting-it-all-together.ashx >> for reference. >> >> Cheers, >> Mauricio >> >> >> On Fri, Jun 15, 2012 at 11:26 AM, Scott_M < >> [email protected]> wrote: >> >>> We are currently using windsor in our MVC 3 web app. We currently >>> initialize the WindsorContainer via a static constructor in global.asax to >>> resolve global Logging components and Windows Identity Foundation >>> components. This seems to work well but I realized that we never dispose >>> of the container. This seems like a possible anti pattern. What are the >>> best places to instantiate / dispose the Windsor container in global.asax? >>> >>> thanks >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Castle Project Users" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/castle-project-users/-/bT9zo6puEiYJ. >>> To post to this group, send email to >>> [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/castle-project-users?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Castle Project Users" group. >> To post to this group, send email to >> [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/castle-project-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
