Threading models


2005-11-16 05:12:23 PM
off-topic0
Hi all,
I'm using httpsrvr.dll with IIS 5 on Windows 2000 Server, with latest
service packs and updates.
My DataSnap appserver is an in-process COM server registered with
tmApartment (Single-Threaded Apartment, STA) threading model. Httpsrvr.dll
initializes its threads as Multi-Threaded Apartment (MTA) mode (using
CoInitializeEx(nil, COINIT_MULTITHREADED)).
Recently, I've noticed that this combination causes the appserver to run in
a single-threading model: COM serializes every call into one thread. This
means each request is blocking all other requests, only one request is
processed at a time.
The problem is solved by registering the appserver with tmFree (MTA)
threading model.
If I remember correctly, STA appservers used to work without blocking. Can
you confirm that?
If so, does it still work in your environment now?
Could the change be caused by some service pack or update?
Is there an option in the configuration of IIS, DCOM, COM+ or something else
which affects this?
Thanks in advance,
TOndrej