1 Reply Latest reply on Aug 28, 2011 8:44 AM by david.seidel

    How to deal with Websphere MQ & provideradapterjndi in JBoss AS6?

    david.seidel Newbie

      Hello,

       

      I'm working with JBoss 5.1.GA. I've created a JMS-Configuration to integrate WebSphere MQ as a JMS Provider.

       

      Here is my configuration:

      @MessageDriven(name = "VistaWorkflowSelectionMDB", activationConfig = {

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

                          @ActivationConfigProperty(propertyName = "destination", propertyValue = "my/destination"),

                          @ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue = "WSMQJMSProvider"),

                          @ActivationConfigProperty(propertyName = "user", propertyValue = "XXXXX"),

                          @ActivationConfigProperty(propertyName = "password", propertyValue = "XXXXX"),

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

                          @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "5") })

      public class MyMDB implements MessageListener {

      ....

      }

        <mbean code="org.jboss.jms.jndi.JMSProviderLoader"

                 name="jboss.mq:service=JMSProviderLoader,name=WSMQJMSProvider">

          <attribute name="ProviderName">WSMQJMSProvider</attribute>

          <attribute name="ProviderAdapterClass">

            org.jboss.jms.jndi.JNDIProviderAdapter

          </attribute>

          <!-- The queue connection factory -->

          <attribute name="QueueFactoryRef">WSMQQueueConnectionFactory</attribute>

          <!-- The topic factory -->

          <attribute name="TopicFactoryRef">WSMQTopicConnectionFactory</attribute>

          <depends>jboss:service=Naming</depends>

        </mbean>

       

       

      <mbean code="my.WSMQConnectionFactory"

               name="jmx.service.wsmq:service=MQQueueConnectionFactory">

          <attribute name="JndiName">WSMQQueueConnectionFactory</attribute>

          <attribute name="JMSStyle">Queue</attribute>

          <attribute name="IsXA">true</attribute>

          <attribute name="QueueManagerName">XXXX</attribute>

          <attribute name="HostName">XXXX</attribute>

          <attribute name="Channel">XXXX</attribute>

          <attribute name="TransportType">MQJMS_TP_CLIENT_MQ_TCPIP</attribute>

          <depends>jboss:service=Naming</depends>

        </mbean>

       

       

      <!-- admin object definition -->

      <mbean code="org.jboss.resource.deployment.AdminObject"

                 name="wsmq:service=Destination,name=tst-q1">

                 <attribute name="JNDIName">my/destination</attribute>

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

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

                 <attribute name="Properties">

                      baseQueueManagerName=XXXX

                      baseQueueName=XXXX

                 </attribute>

                 <depends>jboss:service=Naming</depends>

      </mbean>

       

       

      This configuration works fine with JBoss 5, without using an annotation to determine the ressource adapter.

       

      Now I want migrate to Jboss 6, but

        @ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue = "WSMQJMSProvider")

      is not supported by hornetq.

       

      Is there a similiar way to integrate WebSphere MQ into JMS with JBoss 6?

       

      Regards,

      David