Try OpenEdge Now
skip to main content
Messaging and ESB
Programming for the OpenEdge Adapter for SonicMQ with the ABL - JMS API : Pub/Sub messaging example : Creating a Pub/Sub session procedure
 

Creating a Pub/Sub session procedure

In the following example, the application creates a session object by calling pubsubsession.p persistently.

Creating a Pub/Sub session

DEFINE VARIABLE hPTPSession AS HANDLE NO-UNDO.
RUN jms/pubsubsession.p PERSISTENT
  SET hPubSubSession ("-H localhost -S 5162 ").
Creating the session object specifies the connection parameters to the SonicMQ Broker. This allows an application to set different session-level attributes before starting the JMS session. The connection to the SonicMQ Broker and the JMS session does not occur until the application calls the beginSessionprocedure .