This project has moved and is read-only. For the latest updates, please go here.

Unity.WCF + ThreadLifeTimeManager

Nov 16, 2012 at 5:32 PM

I am using Unity.WCF and I want one object per request, intially I thougth thread life time manager is meant for this. However later I realized that threads are kept alive by WCF framework to provide better performance. Now I am stuck how to acheive the same. I know its not directly related to Unity.WCF project here. I am posting it to get help as I think this is perfect place to ask this question instead of social.msdn.

I read the following article and solution provided in it for the problem I am facing.

Now I am wondering how can I plug in with Unity.WCF?




Feb 6, 2013 at 3:52 PM
You can use the HierarchicalLifetimeManager. This will act as a singleton per request and will also dispose of any components implementing IDisposable at the end of each request.
Dec 9, 2013 at 12:10 AM
I would like an example on how to implement using HierarchicalLifetimeManager, is there any on the web you could point out?

Thanks in advance.

Carlos Adriano Portes