NServiceBus extension to support Microsoft.Extensions.DependencyInjection
Nothing specific needed
License: Other
ServiceCollectionAdapter.RegisterInterfaces method registers interface of a target implementation type with Transient
lifetime, instead of the lifetime of implementation type, that causes ComponentActivatorException
for Castle.Windsor
container, when that interface is resolved second times
Castle.MicroKernel.ComponentActivator.ComponentActivatorException:
Instance {ImplementationType} of component {IInterface}_affce5c5-40e5-4a45-96aa-144328d7346e is already being tracked.
The factory method providing instances of the component is reusing instances, but the lifestyle of the component is Transient which requires new instance each time.
In most cases it is advised for the factory method not to be handling reuse of the instances, but to chose a lifestyle that does that appropriately.
Alternatively, if you do not wish for Windsor to track the objects coming from the factory change your registration to '.UsingFactoryMethod(yourFactory, managedExternally: true)''
As an example, BlobStorageDataBus which implements IDataBus
is registered as a singleton while IDataBus
ends up being registered as a Transient
, causing above error when IDataBus
is resolved second times.
This is a bug caused by forwarding registrations (used to map implemented interfaces to the underlying implementation) being registered in transient scope instead of the scope of the underlying implementation. While this is not strictly incorrect behavior, it can cause containers to detect a mismatch between the registration lifetime. This is the case when using Castle.Windsor and types implementing IDisposable
. There are no other known containers being affected by the current behavior.
Originally raised here: #20
Fixed by #23
IDisposable
When trying to resolve a non-transient type that implements multiple interfaces as well as IDisposable
the following exception might be raised
Castle.MicroKernel.ComponentActivator.ComponentActivatorException:
Instance {ImplementationType} of component {IInterface}_affce5c5-40e5-4a45-96aa-144328d7346e is already being tracked.
The factory method providing instances of the component is reusing instances, but the lifestyle of the component is Transient which requires new instance each time.
In most cases it is advised for the factory method not to be handling reuse of the instances, but to chose a lifestyle that does that appropriately.
Alternatively, if you do not wish for Windsor to track the objects coming from the factory change your registration to '.UsingFactoryMethod(yourFactory, managedExternally: true)''
Dependabot couldn't reach https://www.myget.org/F/particular/api/v3/index.json as it timed out.
Is https://www.myget.org/F/particular/api/v3/index.json accessible over the internet? If it is then this may be a transitory issue and can be ignored - Dependabot will close it on its next successful update run.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.