PFI JMS Node connecting to ActiveMQ

 1 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Jason Beard
Veteran Member
Posts: 124
Veteran Member
    We are using PFI to integrate Lawson with multiple different systems and as an organization are in the process of standardizing integration using JMS.  Previously we were running WebSphere MQ and I had PFI connected and sending JMS messages without much difficulty.  Now we are switching to Apache ActiveMQ and I am unsure of the values to put in the connection fields.
    In the provider url I have tcp://host:61616
    Initial ContextFactory is set to org.apache.activemq.jndi.ActiveMQInitialContextFactory
    ConnectionFactory is set to ConnectionFactory
    Destination is set to the name of the queue to which I am trying to write.

    The error that pflow is giving me is
    Executing activity : Type=MSGQ, ActivityName=JMS7590, ActivityId=MSGQ97, Workunit=1250523 Date:01/17/2011 Time:15:46:39
    Error while executing FgaMsgQueue activity
    javax.naming.NameNotFoundException: "MM_ITEM"
        at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:235)
        at javax.naming.InitialContext.lookup(InitialContext.java:363)
        at com.lawson.bpm.processflow.workFlow.flowGraph.FgaMsgQueue.startActivity(Unknown Source)
        at com.lawson.bpm.processflow.workFlow.flowGraph.FgActivity.execute(Unknown Source)
        at com.lawson.bpm.processflow.workFlow.flowGraph.FgProcess.run(Unknown Source)
        at com.lawson.bpm.pfengine.ProcessFlowEngine.execute(Unknown Source)
        at com.lawson.bpm.pfengine.ProcessFlowEngine.startProcessAt(Unknown Source)
        at com.lawson.bpm.eprocessserver.KBConnection.startProcess(Unknown Source)
        at com.lawson.bpm.eprocessserver.KBConnection.startProcessDesigner(Unknown Source)
        at com.lawson.bpm.eprocessserver.KBConnection.execute(Unknown Source)
        at com.lawson.bpm.eprocessserver.KBConnection.run(Unknown Source)
        at com.lawson.bpm.eprocessserver.util.ThreadPool$PooledThread.run(Unknown Source)

    where MM_ITEM is the name of the queue

    I have changed all the preceding values up to destination and received different errors so I believe that these are all correct and the only thing I have wrong is the destination.  I'm not sure if the queue name needs to be prefixed by something ie queue://MM_ITEM  I have tried several ideas and so far have been unsuccessful.  Does anyone have any experience with this node?

    thank you
    Jason
    Jason Beard
    617-548-5568
    jabeard3@gmail.com
    Jason Beard
    Veteran Member
    Posts: 124
    Veteran Member
      In case anyone is curious I had an error in my classpath relative to my jndi.properties file and as a result it was not recognizing the queue name. So the values listed in my original post are all correct (obviously hostname and queue name will be unique to your environment). And in addition to creating the queue in Active MQ you need to define it in your jndi.properties file and have the directory containing jndi.properties included in the process flow server classpath.
      You will also need to include the base activemq.version.jar file in the classpath. The easiest way to set the classpath is by setting the environment variable BPM_ADDTL_CLASSPATH in /etc/lawson.env (or system environment variables on windows)

      If anyone has questions, let me know.
      Jason Beard
      617-548-5568
      jabeard3@gmail.com