To approach our current EnterpriseServices/COM+ discussion in a somewhat different director, let me ask a question that's been nagging me for a while now. Perhaps someone knows the answer or can point me towards some documentation (online, book, whatever).

What exactly is the relation, and the interactions between, unmanaged and managed contexts? Now, I do know the basics, but not much more. Managed contexts are very undocumented, and I'm not sure I know much about them (I'd particularly like to understand when and why they are created by the runtime), but how they relate to unmanaged contexts is even more misterious (to me, at least).

So, for example, as I understand it, a ContextBoundObject-derived object will be bound to a managed context, while a ServicedComponent-derived object is furthermore constrained to be bound to an unmanaged COM+ context. However, that's doesn't say all that much. For example, is there always a managed context for every unmanaged context? Or can an unmanaged context contain multiple managed contexts? Or are managed ContextBoundObject-derived objects context-agile with respect to unmanaged contexts?

As you see, this is a topic I find confusing, and would love to understand it in greater detail...

Tomas Restrepo

Software developer located in Colombia.