Perform the following steps:
Once the OpenEdge JMS Adapter has been installed, do the following:
- Modify $DLC/properties/JavaTools.properties
Under the [sonicMQ] section, comment out the current classpath then add the following:
classpath=${DLC}/java/progress.jar,<PATH_TO_JMS_CLIENT_Jar>
jvmargs=-DsonicMQExtensions=false -DjmsProvider=<JMS_Vendor>
Example:
classpath=${DLC}/java/progress.jar,${DLC}/java/ext/activemq-all-5.15.9.jar
jvmargs=-DsonicMQExtensions=false -DjmsProvider=ActiveMQ
- Save a copy of $DLC/bin/oemessaging
Modify or set variables before calling oemessaging
Need to set:
JMSPROVIDER=<JMS_Vendor>
JMSCLIENTJAR=<PATH_TO_JMS_CLIENT_Jar>
Example:
export JMSPROVIDER=ActiveMQ
export JMSCLIENTJAR=<full_path>/java/ext/activemq-all-5.15.9.jar
- Within a Proenv session run "oemessaging start".
- Connect to the Generic JMS Adapter broker from the ABL client using code similar to the following (code changes are required depending on your JMS provider and Broker settings):
/* Publishes A Text message. */
DEFINE VARIABLE jmssession AS HANDLE.
DEFINE VARIABLE messageH AS HANDLE.
/* Creates a session object. */
RUN jms/jmssession.p PERSISTENT SET jmssession ("-H localhost -S 5162 "). /* BrokerConnect */
//RUN jms/jmssession.p PERSISTENT SET jmssession ("-SMQConnect "). /* ClientConnect */
RUN setBrokerURL IN jmssession ("localhost:2506").
RUN beginSession IN jmssession.
/* Create a text message */
RUN createTextMessage IN jmssession (OUTPUT messageH).
RUN setText IN messageH ("Golf shoes on sale today").
/* Publish the message on the "GolfTopic" topic */
RUN publish IN jmssession ("GolfTopic", messageH, ?, ?, ?).
RUN deleteMessage IN messageH.
RUN deleteSession IN jmssession.
Note: All the JMS related jars under $DLC/java/ext/ are for testing and demo purposes only.
The necessary jars need to be obtained from the vendor.