5

If the Component Services console is used to shut down a COM+ Application while there are active threads, what happens to those active threads that the COM+ application created to service the client calls? Are they forcibly closed, or are they allowed to complete before the application is shut down?

hurcane
  • 153
  • 5
  • My experience (ATL tainted) is that if a client holds a reference to the service and the refcount is greater than one, the server waits for the call to complete. But forced shutdown is also possible: then the caller gets an error in the hresult. I don't have the technicals with me right now, let me know if you need more info. – AndreasM Jun 30 '11 at 09:34

1 Answers1

0

No, the client processes are not forcebly closed. However, if they attempt to use the COM object that they hold pointer to, the out-of-process marshaling code will either give an error back, or the server will be restarted and the the code inside the server be called.

I have mostly seen the former, but I've seen the later too, although I cannot vouch that there wasn't some additional "magic" involved that re-started the terminated server.

haimg
  • 631
  • 7
  • 14
  • I think you may have misunderstood my question. It seems to me that you are referring to the client that invoked the RPC call to COM+. I was referring to the active threads within the COM+ application. Question updated to be more precise. – hurcane Oct 21 '11 at 18:03
  • 2
    You asked initially about processes, now about threads. These are two very different things. I think stackoverflow might be a better fit for your question than serverfault. – haimg Oct 21 '11 at 18:35