Using the ABL below to read an ActiveMQ queue results in the following errors.
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 IN-UNDO.
/* Creates the session object. */
RUN jms/ptpsession.p PERSISTENT SET ptpsession ("-SMQConnect").
/* Set user credentials. */
RUN setBrokerURL IN ptpsession (INPUT "tcp://IN38933000:61616").
/* Note: the format for broker URL with ActiveMQ is tcp://hostname:port.
default port is 61616. If broker URL is not in the correct format you might see the following
message in the cc.server.log
java.lang.Exception: org.apache.activemq.ActiveMQConnectionFactory class file not mentioned correctly: java.lang.reflect.InvocationTargetException
at com.progress.messaging.jms.jms.createQueueFactory(jms.java:220)
*/
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".
Error:
A public jmsfromABL.AdminObjectFinder class was not found, when connecting to ActiveMQ