简体   繁体   中英

JbossESB jmsProvider cannot convert IBMMQ JMS Message JMSTextMessage

I am trying to integrate IBMMQ v6.0.2 with jbossESB.
we have local Queue available on IBMMQ on one of our QA QUEUEMANAGER. I am able to listen to the QUEUE using JMSprovider of jboss ESB. As soon as a message (of type jms_text ) is dropped , esb listen to it and pick it up and before it hit the next action it throws following error message.

ERROR [JmsComposer] Unsupported JMS message type: com.ibm.jms.JMSTextMessage

Here are the steps I followed.

  1. jboss-service.mxl : Defined Connection Factory and QUEUE
  2. added jars ( com.ibm.mq.* ) to ${jbossesb}/server/${mynode}/lib
  3. Added jms lsinterner configuration on jboss-esb.xml

Please guide me what I m missing here... Do I need to create custom MessagePlugin ?

<jms-provider name="WSMQ" connection-factory="MQQueueConnectionFactory"> 
     <jms-bus busid="queuestartGwChannel"> <jms-message-filter
                   dest-type="QUEUE"
                   dest-name="wsmq/SerivceOrderQueue"
                   acknowledge-mode ="AUTO_ACKNOWLEDGE"
                />
     </jms-bus>
     <jms-bus busid="queuestartEsbChannel">
               <jms-message-filter
                   dest-type="QUEUE"
                   dest-name="wsmq/SerivceOrderQueue"
               />
     </jms-bus>
  </jms-provider>

   <mbean code="jmx.service.wsmq.WSMQConnectionFactory"
     name="jmx.service.wsmq:service=MQQueueConnectionFactory">
    <attribute name="JndiName">MQQueueConnectionFactory</attribute>
    <attribute name="JMSStyle">Queue</attribute>
    <attribute name="IsXA">false</attribute>
    <attribute name="QueueManagerName">SQAT0083</attribute>
    <attribute name="HostName">111.111.111.111</attribute>
    <attribute name="Port">1415</attribute>
    <attribute name="Channel">MYCO.SVRCONN</attribute>
    <attribute name="TransportType">CLIENT</attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
  <mbean code="jmx.service.wsmq.WSMQDestination"
     name="jmx.service.wsmq:service=WSMQRequestQueue">
     <attribute name="JndiName">wsmq/SerivceOrderQueue</attribute>
     <attribute name="JMSStyle">Queue</attribute>
     <attribute name="QueueManagerName">SQAT0083</attribute>
     <attribute name="DestinationName">MYCO.SERVICEORDER.QA01.QL01</attribute>
     <attribute name="TargetClient">MQ</attribute>
     <depends>jboss:service=Naming</depends>
   </mbean>

I am using jboss-eap-4.3. Really appreciate any help.

Here is my Service Tag Looks like in jboss-esb.xml

        <listeners>


            <jms-listener name="MQ-Gateway"
                 busidref="queuestartGwChannel"
                 is-gateway="true"  maxThreads="1"
             />

            <jms-listener name="MQ-EsbListener"     busidref="queuestartEsbChannel"             />
        </listeners>

        <actions mep="OneWay">
            <action name="serviceOrderMarshaller"
                class="com.my.esb.actions.ServiceOrderMessageUnMarshallerAction"
                process="unmarshalPayload">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>
            <action name="serviceOrderStaging"
                class="com.my.esb.actions.ServiceOrdersStagingAction"
                process="stageServiceOrders">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="marginAndLeadTimeRetriever"
                class="com.my.esb.actions.MarginAndLeadTimeRetrieverAction"
                process="retrieveJobCodeInfo">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="createDraftRequestMapper"
                class="com.my.esb.actions.CreateDraftRequestMapperAction"
                process="mapData">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="omsCreateDraftRequestTranslator"
                class="com.my.esb.actions.OMSCreateDraftRequestTranslatorAction"
                process="translateData">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="createDraftRequestProcessor"
                class="com.my.esb.actions.CreateDraftRequestProcessorAction"
                process="dispatchRequest">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

</actions>

Bit late response but if someone reads this, the answer is:

queuestartEsbChannel is listening to the same queue that is delivering jmstextmessages and it has is-gateway set to false (default value).

If is-gateway is false , only ESB messages can be recieved on that listener.

I would have expected to see com.ibm.mqjms.jar in the CLASSPATH for a JMS app, not com.ibm.mq.*.

Depending on the version of WMQ you are using, please reference the Environment Variables page in the Infocenter. WMQ V6 page is here (see Table #2), and the WMQ v7 page is here (see the table and the notes below). Note that the classes have been repackaged between versions and the CLASSPATH requirements are quite different.

On UNIX flavors, you can run the setmqjms script to configure the environment for WMQ JMS. It lives in /opt/mqm/java/bin or /usr/mqm/java/bin on AIX. This assumes a standard WMQ client installation, though. If you just grabbed the jars and relocated them, it won't work. In particular, if you just grabbed the com.ibm.mq* jars it likely won't work. You can verify your installation by running the Initial Verification Test (IVT) supplied with the client install. The additional benefit of using a full WMQ client is that all of the trace utilities and sample code and other diagnostics are installed.

One other piece of advice, be sure to use the WMQ v7 client even if the WMQ server is at v6 . This is because WMQ v6 is going out of service next year and will not be supported after that. Using the v7 client now will save you a migration later, CLASSPATH changes, etc. In addition, the v7 classes have lots of cool new features when used with a v7 QMgr such as automatic client reconnection to the same or different QMgr, depending on your configuration. The WMQ client install is a free download (registration required) as SupportPac MQC7 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM