You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The installers are run only after the receive feature is built, meaning that there is an implication that containers must be modifiable after they have already started resolving components. While this is an ok expectation, there is no test to validate that behaviour. Some of the container packages also make the assumption that once they are built they are not going to be modified. This is going to be a problem as more containers move towards being immutable once built (Autofac is probably the next one).
We either need a test to validate that containers can be changed, or we need to change the code so that there are no paths that modify the containers after asking for values from them.
The text was updated successfully, but these errors were encountered:
WilliamBZA
changed the title
Installers are run after ReceiveFeature is built
Containers are expected to be alterable after being built
Nov 22, 2018
Turns out that this break spring after all. The sample I tested on used the learning transport which doesn't need installers. Enabling the installers results in spring blowing up with
Name
Value
Type
▶
$exception
{"Altering the registrations, after the container components has been resolved from the container, is not supported."}
andreasohlund
changed the title
Containers are expected to be alterable after being built
Enabling installers cause endpoints to fail during startup when the container used is immutable
Dec 4, 2018
Who's affected
Users configuring a container that is immutable after first resolve like Spring.net and SimpleInjector.
Symptoms
Endpoint fails to start with an exception that container registrations can't be altered after first resolve.
Backported to
7.0.3
Original report
Comes from: WilliamBZA/NServicebus.SimpleInjector#12
The installers are run only after the receive feature is built, meaning that there is an implication that containers must be modifiable after they have already started resolving components. While this is an ok expectation, there is no test to validate that behaviour. Some of the container packages also make the assumption that once they are built they are not going to be modified. This is going to be a problem as more containers move towards being immutable once built (Autofac is probably the next one).
We either need a test to validate that containers can be changed, or we need to change the code so that there are no paths that modify the containers after asking for values from them.
The text was updated successfully, but these errors were encountered: