Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 9:34
add comment

1 Answer

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.