Kbase P21275: 4GL/ABL: How to check whether a connection between the client and the Progress AppServer actually ex
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/3/2008 |
|
Status: Verified
GOAL:
4GL/ABL: How to check whether a connection between the client and the Progress AppServer actually exists?
GOAL:
How to detect whether there is a real physical connection between the client and the AppServer?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
OpenEdge Server Technology Category: AppServer
FIX:
A failure of the connection between the client and the Progress AppServer can fail due to a variety of reasons.
Despite the lack of physical or real connection between the client and the AppServer, the AppServer handle might appear to be still valid when the client application checks its validity using the VALID-HANDLE(hAppServerHandle) function.
Moreover, the server object method hAppServerHandle:CONNECTED() might still return TRUE in some circumstances despite the fact that the real connection between the server and the client has actually been lost.
One way to detect whether there is a real physical connection between the client and the AppServer is to:
1. Write a dummy.p remote procedure on the server that does nothing at all.
2. In the client application, write a statement to run the remote dummy.p procedure with the NO-ERROR option:
RUN dummy.p ON SERVER hAppServerHandle NO-ERROR.
3. In the client application, check the ERROR-STATUS:ERROR and the ERROR-STATUS:NUM-MESSAGES.
4. If the ERROR-STATUS:ERROR returns TRUE OR the ERROR-STATUS:NUM-MESSAGES returns a value greater than zero, then your connection to the AppServer is lost and you might want to take some appropriate action.
5. If the ERROR-STATUS:ERROR returns FALSE AND the ERROR-STATUS:NUM-MESSAGES returns zero then there is a real connection with the AppServer, and you may proceed with your normal processing.