C
cverbiest
Guest
Is there sample code available demonstrating the use of the JMS adapter with an ActiveMQ. https://community.progress.com/community_groups/openedge_development/m/documents/1986.aspx contains only very small code fragments. The only samples I found in the documentation relate to SonicMQ . I tried replacing the soniq url with an activemq url but I don't see which part the OE nameserver should play here. The code below gives following error --------------------------- Error (Press HELP to view stack trace) --------------------------- Application Service adapter.progress.jms not found at NameServer at Host 127.0.0.1 Port 5162. (8245) --------------------------- OK Help --------------------------- DEFINE VARIABLE hConsumer AS HANDLE NO-UNDO. DEFINE VARIABLE hPubSubSession AS HANDLE NO-UNDO. message "starting" view-as alert-box. /* Creates the Pub/Sub session. */ /* RUN jms/pubsubsession.p persistent SET hPubSubSession ("-H localhost -S 5162 "). */ RUN jms/pubsubsession.p persistent SET hPubSubSession (""). /*Connects to the broker */ RUN setBrokerURL IN hPubSubSession ("tcp://sampleHost:61616"). RUN beginSession IN hPubSubSession. /* Subscriptes to the newTopic topic. Received messages are handled by the myintproc internal procedure. */ RUN createMessageConsumer IN hPubSubSession (THIS-PROCEDURE, "myintproc", OUTPUT hConsumer). /* Subscribes to newtopic */ RUN SUBSCRIBE IN hPubSubSession ("newTopic", ?, ?, NO, hConsumer). /* Start receiving requests */ RUN startReceiveMessages IN hPubSubSession. /* Wait to receive the messages. */ WAIT-FOR u1 OF THIS-PROCEDURE. /* Delete session */ RUN deleteSession IN hPubSubSession. message "Done". PROCEDURE myintproc: DEFINE INPUT PARAMETER hMessage AS HANDLE NO-UNDO. DEFINE INPUT PARAMETER hConsumer AS HANDLE NO-UNDO. DEFINE OUTPUT PARAMETER hReply AS HANDLE NO-UNDO. /* Business logic here */ . . . /* Delete message. */ RUN deleteMessage IN hMessage. APPLY "U1" TO THIS-PROCEDURE. END. I have activemq running and currently use it with a stomp client.
Continue reading...
Continue reading...