2 Replies Latest reply on Jul 6, 2006 4:32 PM by jprossjr

    Attempting to override the DefaultJMSProvider

    jprossjr

      Greetings,
      I am attempting to get JBoss to read data from a MQSeries queue. I?ve almost got it working, but am stuck on one step. The JNDIProviderAdapter in class MDB keeps retrieving the ?DefaultJMSProvider?. This causes it to fall into the SpyConnection logic, instead of the WSMQ logic that I want it to fall into. I?m certain there must be a way in one of the xml config files to override this and make it use the ?WSMQJMSProvider? instead, but I can?t make it work. If I set a breakpoint and override the value of 'queueFactoryRef' by hand, it works. I just can't figure out to change the configuration to make JBoss do this itself.

      Can anyone provide some guidance?

      I?m using JBoss v4.0.3SP1 and MQSeries v5.3.

      Thanks for any help,
      Jim

        • 2. Re: Attempting to override the DefaultJMSProvider
          jprossjr

          For those interested, the missing piece that I could not deduce from the documentation, was the need for an annotation in my MDB class. Specifically:

          @ActivationConfigProperty(propertyName = "providerAdapterJNDI", propertyValue="java:/WSMQJMSProvider")


          The annotation references the following which I stuck in the jms-ds.xml file:
          <!-- non XA provider loader and connection factory -->
           <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>
           </mbean>
           <no-tx-connection-factory>
           <jndi-name>WSMQJms</jndi-name>
           <adapter-display-name>JMS Adapter</adapter-display-name>
           <!-- JCA 1.0 Comment out for JBoss 3.2.x / Remove it for JBoss 4.x -->
           <!-- <rar-name>jms-ra.rar</rar-name> -->
           <!-- JCA 1.5 Comment out for JBoss 4.x / Remove it for JBoss 3.2.x -->
           <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
           <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
           <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/WSMQJMSProvider</config-property>
           <max-pool-size>20</max-pool-size>
           <!-- <security-domain-and-application>JmsXARealm</security-domain-and-application> -->
           </no-tx-connection-factory>



          Regards,
          Jim