Cannot make JMS connection via PASOE 11.6

Posted by PhilF on 19-Apr-2017 08:06

I am having trouble connecting to ActiveMQ queues from ABL.  I have been running through the examples and docs, and I have tried a variety of combinations; I am running out of monkeys to throw at my keyboard.  In case this is a FAQ I missed, I'll summarize first: 

  I run "beginSession" and Progress complains ""getConnectionMetaData" was not found. (293)"ails

Details:

OE 11.6, Linux, PAS (not classic App Server).

In AdminServerPlugins.propertiesAdminServerPlugins.properties, I changed

[PluginPolicy.Progress.SonicMQ]
pluginclasspath=/las/progress/versions/11.6/dlc/sonic/MQ8.5/lib/sonic_Client.jar,/las/progress/versions/11.6/dlc/sonic/MQ8.5/lib/mgmt_client.jar,/las/progress/versions/11.6/dlc/java/progress.jar
classpath=/las/progress/versions/11.6/dlc/sonic/MQ8.5/lib/sonic_Client.jar,/las/progress/versions/11.6/dlc/java/progress.jar

to the following:

[PluginPolicy.Progress.SonicMQ]
pluginclasspath=/las/prod/src/resource/activemq-all-5.14.3.jar,/las/progress/versions/11.6/dlc/java/progress.jar
classpath=/las/prod/src/resource/activemq-all-5.14.3.jar,/las/progress/versions/11.6/dlc/java/progress.jar
jvmargs=-DsonicMQExtensions=false -DjmsProvider=ActiveMQ

Currently, start of the code looks like this:

pasConnectStr = "-sessionModel Session-free -URL localhost:8945/.../apsv".
mqUrl = "tcp://somehost:777".

run jms/ptpsession.p persistent set ptpsession (pasConnectStr).
IF NOT VALID-HNDLE(ptpsession) THEN RUN errExit ("PTP failed to start.").

setConnectionURLs in ptpsession (mqUrl).
run beginSession in ptpsession.

At which point Progress complains:

** "getConnectionMetaData" was not found. (293)

I'm guessing this has something to do with my PAS connection string, but I'm not sure what.  Most of the examples I can find either connect to SonicMQ or use AppServer Classic.   I do have code that runs a test program directly on PAS using these parameters.  That is, the following simple program works:

pasConnectStr = "-sessionModel Session-free -URL localhost:8945/.../apsv".

CREATE SERVER AppHandle.
retVal = AppHandle:CONNECT(pasConnectStr).
IF NOT retVal THEN RUN errExit ("PAS connect failed.").
RUN testprog.p ON AppHandle(OUTPUT msg).

--

Ultimately the goal will be to listen for messages on a particular queue, to use a header to determine the nature of the message, and then to respond on a second queue.  I have at least some of this -- but I won't know how close I am till I can begin the conversation.

 

All Replies

Posted by Anand Adike on 21-Apr-2017 05:39

Hi Philf,

Follow the below steps in order to connect ActiveMQ from ABL via PASOE server.

1) Update the $DLC/properties/AdminServerPlugins.properties file with ActiveMQ configuration as shown below:

[PluginPolicy.Progress.SonicMQ]
pluginclasspath=${DLC}/java/progress.jar,${DLC}/java/ext/activemq-all-5.14.0.jar
classpath=${DLC}/java/progress.jar,${DLC}/java/ext/activemq-all-5.14.0.jar
jvmargs=-DsonicMQExtensions=false -DjmsProvider=ActiveMQ

2) After updating the above properties stop and start the AdminServer.

3) Start the sonicMQ1 adapter using the following command from proenv.

proenv>adaptman -i sonicMQ1 -start

4) Create the PASOE instance and start it
5) Copy the Producer/Consumer code in <PASOE_Instance>/openedge/ directory and use the following URL in Producer/Consumer to connect sonicMQ1 adapter.
RUN jms/jmssession.p PERSISTENT SET ptpsession ("-H localhost -S 5162 -AppService AD.sonicMQ1").
6) Execute the client request as shown below.

DEFINE VARIABLE happsrv AS HANDLE NO-UNDO.
CREATE SERVER happsrv.
IF happsrv:CONNECT("-URL http://localhost:8810/apsv -sessionModel Session-free") THEN
DO :

RUN Producer.p ON happsrv.
happsrv:DISCONNECT().
END.
DELETE OBJECT happsrv.

Hope this helps!!

Thanks,
Anand.

This thread is closed