Skip to content

It'd be better to register services with Singleton LifeStyle in IoC container #8

Closed
karpenkov opened this Issue Dec 30, 2011 · 1 comment

2 participants

@karpenkov

Hi,

Currently all services are registered with Transient LifeStyle in IoC container:

public void Install(IWindsorContainer container, IConfigurationStore store)
{
   ....
   container.Register(Component.For<IPluginService>().ImplementedBy<NHibernatePluginService>().LifeStyle.Transient);
   container.Register(Component.For<IPluginLocaleService>().ImplementedBy<NHibernatePluginLocaleService>().LifeStyle.Transient);
   container.Register(Component.For<IWidgetService>().ImplementedBy<NHibernateWidgetService>().LifeStyle.Transient);
   ....
}

This may cause some performance issues and it would be better to register them as Singletons.

@coreframework
Owner

Implemented in version 3.0.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.