Kbase P181486: How to monitor WebSpeed agent that are connecting the Sonic using server connect?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  28/01/2011 |
|
Status: Unverified
GOAL:
How to monitor WebSpeed agent that are connecting the Sonic using server connect?
GOAL:
How to identify WebSpeed agents that are connecting from different WebSpeed broker using server connect?
GOAL:
How to identify WebSpeed agent connecting to sonic using ServerConnect?
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
FIX:
The following sample code can be used to identify WebSpeed agent on the Sonic Management Console under the Containers connections as ConnectID=FooBar under the Identity column:
The value inside the <> should be replaced with appropriate value.
/********************************************************************/
Define var ghSession as handle.
Define var msgConsumer as handle.
run jms/jmssession.p persistent set ghSession ("-SMQConnect").
RUN setConnectionURLs IN ghSession ("<host_Name>:<port>") NO-ERROR.
RUN setUser IN ghSession ("Administrator") NO-ERROR.
RUN setPassword IN ghSession ("Administrator") NO-ERROR.
RUN setConnectID IN ghSession ("FooBar") NO-ERROR.
RUN beginSession IN ghSession NO-ERROR.
RUN createMessageConsumer IN ghSession (
THIS-PROCEDURE, /* This proc will handle it */
"messageHandler", /* name of internal procedure */
OUTPUT msgConsumer).
/*run startReceiveMessages in ghSession.*/
wait-for U1 of this-procedure.
run deleteSession in ghSession.
PROCEDURE messageHandler:
DEFINE INPUT PARAMETER messageH AS HANDLE NO-UNDO.
DEFINE INPUT PARAMETER messageConsumerH AS HANDLE NO-UNDO.
DEFINE OUTPUT PARAMETER autoReplyH AS HANDLE NO-UNDO. /* Not used in this example */
End.
/********************************************************************/
You can modify the above example to meet your needs.