1 Reply Latest reply on Oct 8, 2012 4:00 AM by billy.sjoberg

    WebsphereMQ on JBoss AS 6

    domboeckli

      Hello,

       

      We are moving our environment form JBOSS AS 4.21 to JBoss 6.0. In 4.2,1 I was able to connect to an alternate JMS provider, in our case: Websphere MQ. I used following documentation: http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html.

       

      For AS 6 there were some smaller changes needed in the configuration and finally the JBoss AS started without errors:

       

      13:36:27,371 INFO  [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'A.TPFLOG'

      13:36:27,392 INFO  [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'A.VM.CURRENT.LOG'

      13:36:27,413 INFO  [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'A.CATLOG'

      13:36:27,434 INFO  [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'A.IPMON'

      13:36:27,462 INFO  [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'A.LISTING'

      13:36:27,482 INFO  [AdminObject] Bound admin object 'com.ibm.mq.connector.outbound.MQQueueProxy' at 'A.NOTIFY'

      13:36:27,543 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=WSMQQueueConnectionFactory' to JNDI name 'java:WSMQQueueConnectionFactory'

       

      I thought I am over the hill in that topic, but it was not the case. When I deployed the first MDB using some of those queues I got following error:

       

      2011-04-01 14:05:45,257 INFO  [org.jboss.ejb3.EJBContainer] (HDScanner) STARTED EJB: com.eds.tweb.tpflog.ejb.mdb.TPFlogMDBBean ejbName: TPFlogMDB

      2011-04-01 14:05:45,283 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=jboss.j2ee:jar=tpflog-ejb-1.41-SNAPSHOT.jar,name=TPFlogMDB,service=EJB3 state=Create: org.jboss.deployers.spi.DeploymentException: Error for ActivationSpec class org.hornetq.ra.inflow.HornetQActivationSpec as JavaBean

       

      followed by this:

       

      Caused by: java.beans.IntrospectionException: No property found for: queueManager on JavaBean: org.hornetq.ra.inflow.HornetQActivationSpec(ra=null destination=A.TPFLOG destinationType=com.ibm.mq.jms.MQQueue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)

       

      From the error it is ovious that the queues is using the HornetQActivationSpec instead the one of Websphere MQ.

       

      This are my configuration files:

       

      wsmq-ds.xml

       

      <connection-factories>

       

        <tx-connection-factory>

            <jndi-name>WSMQQueueConnectionFactory</jndi-name>

            <xa-transaction/>

            <rar-name>wmq-jmsra.rar</rar-name>

            <connection-definition>javax.jms.ConnectionFactory</connection-definition>

            <config-property name="hostName" type="java.lang.String">localhost</config-property>

            <config-property name="queueManager" type="java.lang.String">TPF.QMGR</config-property>

            <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/WMQJMSProvider</config-property>

            <max-pool-size>150</max-pool-size>

        </tx-connection-factory>

       

          <!-- ==================================================================== -->

        <!-- WSMQ Connection Factory                                              -->

        <!-- ==================================================================== -->

       

        <mbean code="org.jboss.resource.deployment.AdminObject" name="jboss.jca:service=WASDestination,name=QueueName">

            <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq-jmsra.rar'</depends>

            <attribute name="JNDIName">A.TPFLOG</attribute>

            <attribute name="Type">javax.jms.Queue</attribute>

            <depends optional-attribute-name="RARName">

            jboss.jca:service=RARDeployment,name='wmq-jmsra.rar'

            </depends>

       

            <attribute name="Properties">

                baseQueueManagerName=TPF.QMGR

                baseQueueName=A.TPFLOG

            </attribute>

        </mbean>

      </connection-factories>

       

      This is my Message Driven Bean:

       

      @MessageDriven (name="TPFlogMDBBean",  activationConfig=

      {

              @ActivationConfigProperty(propertyName="destination",            propertyValue="A.TPFLOG"),

              @ActivationConfigProperty(propertyName="destinationType",        propertyValue="javax.jms.Queue"),

              @ActivationConfigProperty(propertyName="useJNDI",                propertyValue="false"),

              @ActivationConfigProperty(propertyName="hostName",               propertyValue="localhost"),

              @ActivationConfigProperty(propertyName="queueManager",           propertyValue="TPF.QMGR")

      })

      @ResourceAdapter("wmq-jmsra.rar")

       

      @TransactionManagement(TransactionManagementType.CONTAINER)

      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)

       

      public class TPFlogMDBBean implements MessageListener {

       

       

         /** The connectionfactory. */

          @Resource(mappedName="java:WSMQQueueConnectionFactory")

          private ConnectionFactory connectionfactory;

       

      It seems that the Resource Annotation (@ResourceAdapter("wmq-jmsra.rar")) is completely ignored.In the JMX Console I verified if the adapter has been deployed, and it is the case.

      In fact, in the resource annotation I can even address an nonexisting rar without appearing any error.

      eg. : @ResourceAdapter("rubish.rar")

       

       

      Any light on these above issues would be highly appreciated.

       

      Many thanks

       

      Dominique