3 Replies Latest reply on Jul 31, 2015 2:20 PM by Justin Bertram

    Not able to use QueueConnectionFactory JNDI name in ejb-jar.xml to avoid redundant code.

    mail2 pps Newbie

      Hello, I'm working on application migrating from Websphere to JBoss. I picked jboss-eap-6.2.0 for deployment and Websphere RA(WebMq-7.5.0) to connect WMQ,  it is connecting to both un-secured and secured Websphere Queue if I define all the information. like QMGR, QName, QHostname,QPort etc in ejb-jar.xml(no jboss.xml/jboss-ejb3.xml file. the same information had already defined in standalone-full.xml with JNDI name so I'm trying use QCF JNDI name with "connectionFactoryJndiName" activation-config-property-name in ejb-jar.xml file, but jboss is not recognizing qcf jndi name. In the server startup log, getting below warning message. As it's not recognizing qcf JNDI name, it tries to connect localhost(1414) by default. I really don't wanna define the queue details in both ejb-jar.xml and standalone-full.xml. has anyone encountered the same issue? and found the solution? your help is much appreciated. Thanks for you time in Advance.

       

      18:04:07,630 WARN  [org.jboss.as.ejb3] ActivationConfigProperty connectionFactoryJndiName/messagingType will be ignored since it is not allowed by resource adapter: wmq.jmsra.rar

       

      Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').

          at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:209)

          ... 22 more

      Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2538;AMQ9204: Connection to host 'localhost(1414)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2538;AMQ9213: A communications error for  occurred. [1=java.net.ConnectException[Connection refused: connect],3=localhost]],3=localhost(1414),5=RemoteTCPConnection.connnectUsingLocalAddress]

          at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:2053)

          at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1226)

          at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:345)

          ... 21 more

      Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2538;AMQ9213: A communications error for  occurred. [1=java.net.ConnectException[Connection refused: connect],3=localhost]

       

      ejb-jar.xml

      ----------------

      ....

      <message-driven>

          <display-name>ProcessService</display-name>

          <ejb-name>ProcessService</ejb-name>

          <ejb-class>com.chase.chf.emi.common.framework.mdb.ProcessServiceBean</ejb-class>

          <messaging-type>javax.jms.MessageListener</messaging-type>

          <transaction-type>Container</transaction-type>

          <message-destination-type>javax.jms.Queue</message-destination-type>

          <activation-config>

              <activation-config-property>

                  <activation-config-property-name>useJNDI</activation-config-property-name>

                  <activation-config-property-value>true</activation-config-property-value>

              </activation-config-property>

              <activation-config-property>

                  <activation-config-property-name>destinationType</activation-config-property-name>

                  <activation-config-property-value>javax.jms.Queue</activation-config-property-value>

              </activation-config-property>

              <activation-config-property>

                  <activation-config-property-name>destination</activation-config-property-name>

                  <activation-config-property-value>java:jboss/jms/QueueJNDI</activation-config-property-value>

              </activation-config-property>

              <activation-config-property>

                  <activation-config-property-name>acknowledgeMode</activation-config-property-name>

                  <activation-config-property-value>Auto-acknowledge</activation-config-property-value>

              </activation-config-property>

              <activation-config-property>

                  <activation-config-property-name>messagingType</activation-config-property-name>

                  <activation-config-property-value>javax.jms.MessageListener</activation-config-property-value>

              </activation-config-property>

              <activation-config-property>

                  <activation-config-property-name>connectionFactoryJndiName</activation-config-property-name>

                  <activation-config-property-value>java:jboss/jms/QCFJNDI</activation-config-property-value>

              </activation-config-property>   

      <message-driven>

      .....

        • 1. Re: Not able to use QueueConnectionFactory JNDI name in ejb-jar.xml to avoid redundant code.
          Joe Park Newbie

          We are also getting following Issue.

          I can't post new Thread for some reason..

           

          "11:21:59.475.00  1128 CC=2;RC=2009;AMQ9213: A communications error for 'TCP' occurred." 

          Could you please shed more light on this error, would this be an error caused by Client or Server?

           

           

           

           

          Error: IBM MQ AMQ9213: A communications error for TCP/IP occurred

           

           

           

           

          Running EAP 6.3.3 and MQRA 7.5.0.4. Redhat 6

           

           

          Our MQ Team nnoticed JBoss connection keep restarting every 2 mins.

           

           

          JBOSS MQ is able to connect MQRA and have no problem connecting to it

          but again the issue is AMQ9213 and restart very frequent.  (every 2 mins I see this error)

          Too Often!

           

           

           

           

           

           

          #1)What we have done so far..

           

           

          Made changes to Standalone-ha.xml including :

           

          .Change heart beat

          .Change connection pools

           

           

          #2)Made changes to ra.xml (wmq.jmsra.rar)

          Setting

          "reconnectionRetryCount" and "reconnectionRetryInterval" to higher value.

           

          However, we don't use wmq.jmsra.rar BUT we used extract version of wmq.jmsra.rar example : /opt/jboss/modules/com/ibm/mq/main/

           

           

          (so there is no wmq.jmra.rar in the folder)

           

          #3) add system enviornment

          export MQNOREMPOOL to 1

          Restart Jboss same problem.

           

           

           

          HELP@!@@@

           

          Thank you.

          • 2. Re: Not able to use QueueConnectionFactory JNDI name in ejb-jar.xml to avoid redundant code.
            Justin Bertram Master

            Just so people who find this via Google (or equivalent) have a good answer I'll copy/paste what I said in the other thread where you posted this same question...

             

            As far as I know the WebSphere MQ JCA RA doesn't support the functionality you're looking for.  The error message is clear - "ActivationConfigProperty connectionFactoryJndiName/messagingType will be ignored since it is not allowed by resource adapter: wmq.jmsra.rar".  In other words, the WebSphere MQ JCA RA (i.e. wmq.jmsra.rar) doesn't support the activation configuration property "connectionFactoryJndiName".  The application server has no control over this.

             

            I've seen lots of users who don't want to repeat the same configuration details for both inflow and outflow, but that doesn't appear possible.  I recommend you work with IBM to implement the functionality you're looking for.

            • 3. Re: Not able to use QueueConnectionFactory JNDI name in ejb-jar.xml to avoid redundant code.
              Justin Bertram Master

              As noted on many other threads on this forum, please don't hijack someone else's thread.  If you're having difficulty creating a new thread then join the #wildfly channel on Freenode IRC or email help@jboss.org and hopefully someone can help you with your posting issue.

               

              Regarding your technical issue, errors you receive from the IBM WebSphereMQ JCA RA are really a matter for IBM support.  If you received an error specifically from JBoss integration code or the like then this forum would be the place to go, but the WebSphereMQ JCA RA is closed source (as far as I know) code owned and distributed by IBM and any communication problem between the RA and the WebSphereMQ broker itself is not something we'd have much insight into.