Pictures of Castle Windsor baby containers

After reading the page ( http://docs.particular.net/nservicebus/containers/child-containers ) regarding the support of NServiceBus 3 child containers, I expected that in Castle Windsor, the transition components in the parent container behave like singlets for the child container . However, dependencies of these parent components on child containers are created each time.

Is there a way to achieve this behavior of parent container snapshots in Castle Windsor? In other words, the transition for the component in the container is singleton if it is allowed from the child container.

+5
source share
1 answer

NServiceBus uses the Scoped style functionality in Castle Windsor to implement the functionality of child containers, read about the lifestyle here: http://docs.castleproject.org/Windsor.Whats-New-In-Windsor-3.ashx . In this way, transients will behave the same as transient singleton behave like singlets, and the scope will behave like a singleton pr nservicebus request. We use lifestyles for our ISession and singleton for 99% of the rest. I rarely need transients, at least when working with web applications. Why do you want the components to work differently depending on what it was removed from? I am pretty sure you can do it differently.

0

All Articles