Hello Everyone,
I assume that before asynchronous calls get completes, if app server queued with synchronous call request then we get this error#9004. Progress KB - What is the Progress AppServer asynchronous request mechanism?
Could someone pls shed some light what would be the possible solution(s) on this?
Thanks
By "handled sequentially" do you mean will be assigned to process in the order they are submitted, then I believe the answer is yes BUT, there is no guarantee that the return will be sequential. That is the whole nature of async.
Thanks Brian,
For example, I've an valid appserver handle and not sure whether its already handling any asynchronous calls before I submit any synchronous call I would like to check if any asynchronous calls are in process/uncompleted/queue. I can see some other external progress procedure runs asynchronous RPC with respective EVENT-PROCEDURE. I am developing the new program with the statement to submit synchronous RPC using same app server session handle. In this scenario, I've 3 options. 1. Use new appserver handle to submit synchronous RPC 2. Instead of running synchronous mode, submit the call in asynchronous mode. 3. Before submitting synchronous call check if any asynchronous call already in process.
For option 3, I understand OpenEdge provides a mechanism to check the status of asynchronous requests for a session-managed connection or session-free operating mode. Just to make sure if no asynchronous calls are in queue/process, can we check this criteria by
IF VALID-HANDLE(AppserverHandle) AND AppserverHandle:COMPLETE THEN /* To make sure no uncompleted aynchronous calls exists. */
RUN <ExternalProc>.p ON AppserverHandle.
DO WHILE NOT AppserverHandle:COMPLETE:
PROCESS EVENTS.
IF AppserverHandle:COMPLETE THEN
RUN <ExternalProc>.p ON AppserverHandle.
END.
Thanks.
Great, thanks Brian.
Sorry Brian, done.
Brian, Just curious to confirm, if we submit the call in asynchronous mode again it wont cause #9004 error isn't it? I beleive if operating mode is session managed then new asynchronous call will be in queue, if session free then it would be paralley executed. Pls let me know if my understanding is wrong on this. - Thanks.
Hi Brian, I understand if any outstanding async requests and try to submit a sync request using the same server causes error. However, despite of outstanding "async" request if I submit another "async" request in session free mode then it wont raise any error and it would be handled parrally. In session managed mode these "async" requests are handled sequential order. Is that correct? - Thanks.
By "handled sequentially" do you mean will be assigned to process in the order they are submitted, then I believe the answer is yes BUT, there is no guarantee that the return will be sequential. That is the whole nature of async.
Fine, thanks Brian and Tom.