I'm in the process of moving an application from client/server to Intranet architecture. I have a DLL written in Visual Basic that performs two queries: one ad-hoc and one by ID. My problem is that if I kick off a long ad-hoc query and then kick off a simple query the simple query seems to be blocked by the long one. The DLL is hosted in Component Services in W2K. Only one instance of the object seems to be active?
Is there something fundamental that I'm missing here? How does Component services decide when to instantiate another instance of the object to serve client requests?
Your help is greatly appreciated!
The ASP architecture is 'single-threaded' within the context of each page. This means that the processing for a page only does one thing at a time. It is not particularly accurate to say that an ASP page 'kicks off' a method on a DLL, since what happens is that the ASP page waits for that call to complete before moving on to do any other work.
Component services (MTS or COM+) does not ever arbitrarily run anything in the background - you need to explicitly cause this to happen. This is a good thing, since there are consequences to running tasks in the background that you need to deal with in your client code.
In particular, your client code - the code making the call to the DLL - needs to kick off the background task (which can be done using COM+ Queued Components for instance), and then be smart enough to do its work and then wait around to see if the background task is complete so it can pick up the results. This extra work is an architectural change from typical synchronous processing and is not necessarily a trivial thing to implement.
Dig Deeper on Win Development Resources
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.