INT %GetRPCCallerObject()
PROCEDURE .... ; Úplná identifikácia volajúceho procesu prostredníctvom parametrov INT _callerProcess, _callerObject _callerObject := %GetSelfHBJ(@FALSE) _callerProcess := %GetParentProcessHBJ() ;volanie CALL [E.Service] Question(_callerProcess, _callerObject) ON SELF.EVH ; .... END ....
; Obsluha RPC PROCEDURE Question (IN INT _callerProcess, _callerObject) ; Odpoveď!!! NUTNÉ ASYNC, ak je procedúra Question volaná synchrónne - lebo vznikne DeadLock!!! CALL [(_callerObject)] QuestionReply ASYNC ON (_callerProcess) END Question
PROCEDURE .... ;volanie CALL [E.Service] Question ON SELF.EVH ; .... END ....
RPC PROCEDURE Question ; identifikácia volajúceho procesu INT _callerProcess, _callerObject _callerObject := %GetRPCallerProcess() _callerProcess := %GetRPCCallerObject() ; Odpoveď!!! NUTNÉ ASYNC, ak je procedúra Question volaná synchrónne - lebo vznikne DeadLock!!! IF %GetRPCCallerIsJava() THEN CALLJ [(_callerObject)] QuestionReply ASYNC ON (_callerProcess) ELSE CALL [(_callerObject)] QuestionReply ASYNC ON (_callerProcess) ENDIF END Question
Pridať komentár