ClientConnect is a process that runs with your ABL client session. The following figure shows the architectural relationships between the Progress OpenEdge JMS Adapter and the JMS provider Broker in ClientConnect mode:

To configure the Progress OpenEdge JMS Adapter for ClientConnect mode, follow these steps:
  1. Ensure your JMS provider is running on an accessible machine. For example, ActiveMQ should be running on port 8161 and be accessible at the following URL: localhost:8161.
  2. Connect to the ptpsession using the -SMQConnect connection option. For more information, see Connection options.

The following code example shows how to send messages to an ActiveMQ server using ClientConnect:

DEFINE VARIABLE ptpsession AS HANDLE.
DEFINE VARIABLE messageH AS HANDLE.
DEFINE VARIABLE lDebug AS LOGICAL.
DEFINE VARIABLE cdate AS CHARACTER NO-UNDO FORMAT "x(16)".
DEFINE VARIABLE ddate AS DATE      NO-UNDO.


/* Creates a session object. */
RUN jms/ptpsession.p PERSISTENT SET ptpsession ("-SMQConnect").

/* Set user credentials. */
RUN setBrokerURL      IN ptpsession (INPUT "tcp://localhost:61616").
RUN setUser           IN ptpsession (INPUT "admin").
RUN setPassword       IN ptpsession (INPUT "admin").

/* Connect to the broker. */
RUN beginSession IN ptpsession.

/* Create a text message */
RUN createTextMessage IN ptpsession (OUTPUT messageH).
ddate = DATE(cdate).
RUN setText IN messageH ("This is test message sent.").

/* Publish the message on the "RequestQ" topic */
RUN sendToQueue IN ptpsession ("MyQueue1", messageH, ?, ?, ?).
RUN deleteMessage IN messageH.
RUN deleteSession IN ptpsession.

Message "Sent".