I tried searching the forums for this already and didn't find anything. I
want to expose functionality from a vb6 COM component via a WCF service. I
am trying to evaluate if exposing this webservice and using a COM component
is scalable. I have heard there are problems with this revolving around the
apartment threading models.
I know COM dll's are STA and a WCF service is MTA. Since there is no way to
force a WCF service to be STA, I am expecting all my webservice calls to
block as they are forced through the STA pipe. However, this is not
happening and I am wondering why. To test, I have a web method that takes a
boolean parameter. the web method calls some functions from the COM
component and then if the parameter is true, it pauses the current thread,
otherwise it doesn't. I have two clients that hit the service at the same
time and while one is paused the other is constantly hitting the service. I
am expecting the second client to block while first one is paused. Can
anyone tell me why this isn't happening? Do I need to pause or perform some
long running process from within the COM component to see the behavior I am
talking about?
The end goal is to make sure exposing portions of this COM dll will scale if
called from within a WCF service. I have read articles like the following
that make me very cautious of doing this:
http://msdn.microsoft.com/msdnmag/is...10/WickedCode/
If this is indeed a problem, does anyone know a work around like the one
above for WCF to preserve at least some scalability.