I'm planning on using MEF within ASP.NET looking for some insight into thread safety of the CompositionContainer.
My first approach associated a distinct CompositionContainer to each request but I'm worried that's gonna be expensive and not scale very well, on the other hand the CompositionContainer support thread safe operations through a simple flag in the constructor.
I've also considered the hybrid approach where I might use a thread-safe static CompositionContainer and one which is tied to each request.
Besides the thread safety argument I'm relying heavily on ExportFactory to be able to construct objects as needed. Though, I'm still bugged by this ExportLifeTimeContext thing and I'm uncertain about the resource requirements of this approach.
Anyone got some insight into this?