Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asynchronous ActiveX Exe

Status
Not open for further replies.

rajcssi

Programmer
Nov 9, 2001
7
0
0
US
Hi,
I have an application running smooth on COM+. There is a Client layer, business layer and data layer. This application is running on Oracle database. There are certain stored procedures which are executed from the application that take around 1-2 hours. So, when this process is running the client application is blocked and there is nothing else the user can do with the application but wait for the process to complete. Currently, we are calling the stored procedure from the data layer. To solve this, we thought of doing the following.
* Create an ActiveX Exe.
* Call the Active Exe from the data layer.
* Call the stored procedure in the ActiveX Exe.
By doing this we thought that the data layer would free up and the control returns back to the application. But rightnow, it is not happening this way. The system still is blocked. Is there anyway that we can solve this using ActiveX exe.
Please help...
Thanks,
Rajesh
 
A call to an ActiveX Exe in another process is still synchronous. Typically, to simulate asynchronous behavior, the call to the ActiveX EXE would simply enable a timer control (or some other callback) and then the function would end. The actual work to be performed would be in the timer event or the callback procedure and that would run in its own thread.
That is one option that would work, however, from your description, I would suggest that you look at Queued components. That would allow your DB layer to make a call by simply placing the required data in a queue. at that point, the DB component would be free to do other things. A listener component would grab the data off of the queue and process the information. COM+ autmoatically integrates with MSMQ to allow you to create Queued components in such a way that all of the actual queue processing is done under the covers and you can talk to the queued componenet just as if it were another component. - Jeff Marler B-)
 
Make both DATA and BUSINESS Asynchronous processes... Then that would work...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top