Hi,
We are facing object disposed error after upgrading nServiceBus v5
Here is what we have upgraded to:
•we are including: ◦NServiceBus.Unity 6.1.2
◦NServiceBus 5.0.11
◦Unity 3.5.1401.0
We have two problems after upgrading to above spec:
-
What we used to do in earlier version was in Saga class we used have property injection for IUnityContainer and that used to work before, here is the example.
public class LmmValidationSaga : Sagag, IAmStartedByMessages
{
public IUnityContainer Container { get;set; }
public IManageQueries QueryManager { get;set; }public void Handle(LmmValidationRequest message) { }
}
above sample code used to resolve “Container” in earlier version of nServiceBus and nServiceBus.Unity but now “Container” object is coming null always.
- To do workaround for issue 1 we created constructor for LmmValidationSage and passed IUnityContainer as construction injection and that seems to be working. But doing it that way we are getting another issue which is “object disposed error for UnityObjectBuilder”.
I have found simillar topic in discussion for where you have fixed this issue but it is not the same nServiceBus we are using so that is why i am creating new topic here.
Can you please help us to resolve the issue?
Regards,
Chauhan