Kbase P106018: Is it possible to know the broker name of an AppServer from the 4GL
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
GOAL:
Is it possible to know the broker name of an AppServer from the 4GL
FIX:
Once connected to the AppServer, the CLIENT-CONNECTION-ID of the Server Object handle can give a clue as to the name of the broker we are connected to:
DEFINE VARIABLE hServer AS HANDLE NO-UNDO.
CREATE SERVER hServer.
hServer:CONNECT("-H <hostName> -AppService <serviceName>").
IF hServer:CONNECTED() THEN DO:
MESSAGE hServer:CLIENT-CONNECTION-ID
VIEW-AS ALERT-BOX INFO BUTTONS OK.
hServer:DISCONNECT().
END.
DELETE OBJECT hServer.
The CLIENT-CONNECTION-ID attribute is in the format:
<AppServer IP address>::<AppServer broker name>::<AppServer port>::<Unique ID>::<Unique ID>
It is therefore possible to extract the AppServer broker name from this.
Please be aware, though, that the format of a CLIENT-CONNECTION-ID is subject to change, so it may be risky to code your application in a way that relies on it.
FIX: