2 Replies Latest reply on Aug 21, 2014 10:21 AM by mail2 pps

    Not able to user QCF JNDI name in ejb-jar.xml

    mail2 pps Newbie

      I just wonder, is there any way to use queue connection factory's JNDI name defined in server level(standalone-full.xml) in ejb-jar.xml. I'm using MDB listener to connect with WMQ. If I hard-code all QCF details in ejb-jar.xml, it works perfect, but if i use referenced QCF JNDI name in ejb-jar.xml, it simply ignores any trying to connect localhost(1415).Please note I'm not using vendor specific xml file jboss.xml/jboss-ejb3-ext-api.   Has anyone came across similar issue? and found any solution? Thanks for your time in advance.

        • 1. Re: Not able to user QCF JNDI name in ejb-jar.xml
          jaikiran pai Master

          Please post the relevant working and not working configurations. The question's too vague to guess what might be wrong.

          • 2. Re: Not able to user QCF JNDI name in ejb-jar.xml
            mail2 pps Newbie

            Thanks for the response Jaikiran.  The application is recently migrated from websphere 7.0 to jboss-eap-6.2.0,  and WebMQ-RA  7.5.0 is used to connect websphere queue. there is a internal queue in which the application puts and then there is a MDB listener to listen this queue for message. The QCF detail are defined in standalone-full.xml, this jndi name is used by the application to put messages into the queue. It works fine. Now if I try to use this QCF jndi name QCF_UM in ejb-jar.xml using activation-config-property 'connectionFactoryJNDIName',  It doesn't work. i.e application always tries to connect localhost(1414) by default, It simply ignores the QCF_UM. But If queue connection details like queueManager,hostName,port rather than referenced qcf name, QCF_UM, is used in ejb-jar.xml, it works perfect.  But would like to know is there an option to use referenced QCF name(QCF_UM) in ejb-jar.xml to avoid redundant code in ejb-jar.xml. Appreciate your response and Thanks for your time in advance.

             

            Below are perfectly working configurations.

            standalone-full.xml:

            <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl" jndi-name="java:jboss/jms/QCF_UM" pool-name="jms/QCF_UM">

            <config-property name="queueManager">${qmgr}</config-property>

            <config-property name="hostName">${host}</config-property>

            <config-property name="port">${port}</config-property>

            <config-property name="channel">${channel}</config-property>

            <config-property name="transportType">${transportType}</config-property>

            <config-property name="sslCipherSuite">${sslCipherSuite}</config-property>

            </connection-definition>

            <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/jms/InputQueue" pool-name="InputQueue">

                <config-property name="baseQueueName">${queue}</config-property>

                <config-property name="baseQueueManagerName">${qmgr}</config-property>

            </admin-object>

            ejb-jar.xml

            <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>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>destination</activation-config-property-name> 

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

                </activation-config-property> 

            <!-- Tried to use this QCF_UM here and comment all followed activation config property. but it's not working.

            <activation-config-property>

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

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

            </activation-config-property>

            -->

                <activation-config-property> 

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

                    <activation-config-property-value>${host}</activation-config-property-value> 

                </activation-config-property>  

                <activation-config-property> 

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

                    <activation-config-property-value>${qmgr}</activation-config-property-value> 

                </activation-config-property>                 

                <activation-config-property> 

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

                    <activation-config-property-value>${channel}</activation-config-property-value> 

                </activation-config-property>                 

                <activation-config-property> 

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

                    <activation-config-property-value>${port}</activation-config-property-value> 

                </activation-config-property>                 

                <activation-config-property> 

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

                    <activation-config-property-value>${transportType}</activation-config-property-value>                     

                </activation-config-property> 

                <activation-config-property> 

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

                    <activation-config-property-value>${sslCipherSuite}</activation-config-property-value>                     

                </activation-config-property>                 

            </activation-config> 

             

            Regards,

            Ponnuchamy