Search code examples
windowscominteropcom+

Are there any reasons not to host a COM server in a COM+ application?


The simplest way to transform an in-proc COM server into an out-proc COM server is creating a COM+ application. What are the possible drawbacks of doing it this way?


Solution

  • I really can't think of any reason to create your own container or use a 3rd party one (if any exist) in favour of MTS/COM+. I mean it does all the things you'd want:

    • Lets you chose the distribution of COM objects to container processes.
    • Lets you configure the account they run under.
    • Monitors the container processes and restarts if necessary and can recycle them.
    • Even allows you to host STA components in scenarios where you need multiple threads serviced by starting up multlple worker processes. etc.

    It's hard to imagine doing better than that without spending 6 months or more on it.