Combining COM Objects and .NET Web Services
I have a COM object that I need to access my .NET web service.
I know the whole STA / MTA thing, so my COM object will be converted to MTA and will not have global state (although it itself is not multithreaded).
If I configure this as a COM + server and set up an object pool, does that mean it will use a different COM object instance for each web service thread? Not a queue?
thanks
a source to share
It depends on several things.
If you set an upper limit on the number of objects in the pool and store the object reference in the web service client, and you don't JIT or set the Done flag in the method call, they will queue up as soon as they hit the pool.
If you are JITing and setting the Done flag by calling SetComplete or using the AutoComplete attribute on the method, the COM + component will be deactivated and returned to the pool when the method returns. If the number of concurrently executing methods does not reach the maximum pool limit, new method calls will never wait.
a source to share