1 Reply Latest reply on Aug 15, 2003 8:51 AM by Adrian Brock

    MQSeries XA not supported problem

    sr1962 Newbie

      Trying to get MQSeries and JBoss talking together. I am using JBoss-4.0.0DR2. I get XA not supported message, although this flag is set to false (see below), what am I doing wrong?

      --


      Configured jms-ds.xml as follows:

      <!-- The JMS provider loader -->

      DefaultJMSProvider

      org.jboss.jms.jndi.JBossMQProvider

      ods/queueConnectionFactory
      ods/topicConnectionFactory


      <!--mbean code="org.jboss.jms.jndi.JMSProviderLoader"
      name="jboss.mq:service=JMSProviderLoader,name=JBossMQProvider">
      DefaultJMSProvider

      org.jboss.jms.jndi.JBossMQProvider

      java:/XAConnectionFactory
      java:/XAConnectionFactory
      </mbean-->

      <!-- The server session pool for Message Driven Beans -->
      <!--mbean code="org.jboss.jms.asf.ServerSessionPoolLoader"
      name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
      <depends optional-attribute-name="XidFactory">jboss.tm:service=XidFactory
      StdJMSPool

      org.jboss.jms.asf.StdServerSessionPoolFactory

      </mbean-->

      <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->

      <resource-adapter>
      <adapter-display-name>JMS Adapter</adapter-display-name>
      <ra-name>jmsra</ra-name>
      <bootstrap-context-name>jboss.jca:service=BaseBootstrapContext</bootstrap-context-name>
      </resource-adapter>

      <tx-connection-factory>

      <jndi-name>JmsXA</jndi-name>

      <resource-adapter>jmsra</resource-adapter>
      <xa-transaction/>

      <adapter-display-name>JMS Adapter</adapter-display-name>

      <config-property name="SessionDefaultType">javax.jms.Topic</config-property>

      <security-domain>JmsXARealm</security-domain>

      </tx-connection-factory>

      -----

      Configured standardjboss.xml as follows:

      <invoker-proxy-binding>
      message-driven-bean
      <invoker-mbean>message-driven-bean</invoker-mbean>
      <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
      <proxy-factory-config>
      MQJMSProvider
      java:/StdJMSPool
      15
      1
      True

      10

      queue/DLQ
      10
      0


      </proxy-factory-config>
      </invoker-proxy-binding>
      ::
      ::
      <container-configuration>
      <container-name>MQ Message Driven Bean</container-name>
      <call-logging>false</call-logging>
      <!--invoker-proxy-binding-name>mq-message-driven-bean</invoker-proxy-binding-name-->
      <container-interceptors>
      org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
      org.jboss.ejb.plugins.LogInterceptor
      org.jboss.security.RunAsSecurityInterceptor
      org.jboss.ejb.plugins.MetricsInterceptor
      org.jboss.resource.endpoint.MessageEndpointInterceptor
      org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor
      org.jboss.resource.connectionmanager.CachedConnectionInterceptor
      </container-interceptors>
      <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
      <instance-cache/>
      <persistence-manager/>
      <container-pool-conf>
      100
      </container-pool-conf>
      </container-configuration>


      (For some reason invoker binding doesn't seem to work?)

      -----

      EJB -- ejb-jar.xml as follows:

      <?xml version="1.0"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
      <ejb-jar>
      <enterprise-beans>
      <message-driven>
      <ejb-name>PrintBean</ejb-name>
      <ejb-class>mdb.PrintBean</ejb-class>
      <message-selector></message-selector>
      <transaction-type>Container</transaction-type>
      <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
      <message-driven-destination>
      <destination-type>javax.jms.Topic</destination-type>
      </message-driven-destination>
      <!--resource-ref>
      <res-ref-name>jms/MQTCF</res-ref-name>
      <res-type>javax.jms.TopicConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      <resource-ref>
      <res-ref-name>jms/PBTopic</res-ref-name>
      <res-type>javax.jms.Topic</res-type>
      <res-auth>Container</res-auth>
      </resource-ref-->
      <!--security-identity>
      <run-as>
      <role-name>guest</role-name>
      </run-as>
      <user-caller-identity>abc</user-caller-identity>
      </security-identity-->
      </message-driven>
      </enterprise-beans>
      <!--assembly-descriptor>
      <container-transaction>

      <ejb-name>PrintBean</ejb-name>
      <method-name>onMessage</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor-->
      </ejb-jar>

      (Comment out elements make no difference to the problem).

      ----
      jboss.xml as follows:

      <?xml version="1.0"?>

      <!--resource-managers>
      <resource-manager>
      <res-name>topicfactoryref</res-name>
      <res-jndi-name>ods/topicConnectionFactory</res-jndi-name>
      </resource-manager>
      <resource-manager>
      <res-name>topicref</res-name>
      <res-jndi-name>topic/abc</res-jndi-name>
      </resource-manager>
      </resource-managers-->
      <enterprise-beans>
      <message-driven>
      <ejb-name>PrintBean</ejb-name>
      <configuration-name>MQ Message Driven Bean</configuration-name>
      <destination-jndi-name>topic/abc</destination-jndi-name>
      <xa-connection>false</xa-connection>
      <mdb-user>abc</mdb-user>
      <mdb-passwd></mdb-passwd>
      <!--mdb-subscriber-id>DurableSubscriberExample</mdb-subscriber-id-->
      <!--resource-ref>
      <res-ref-name>jms/MQTCF</res-ref-name>
      <jndi-name>topicfactoryref</jndi-name>
      </resource-ref>
      <resource-ref>
      <res-ref-name>jms/PBTopic</res-ref-name>
      <resource-name>topicref</resource-name>
      </resource-ref-->
      </message-driven>
      </enterprise-beans>


      (Again commented out elements make no difference)

      ---


      JMS configured as follows:

      define ctx(ods)
      change ctx(ods)

      define tcf(topicConnectionFactory)
      alter tcf(topicConnectionFactory) transport(client)
      alter tcf(topicConnectionFactory) channel(JAVA.CHANNEL)
      alter tcf(topicConnectionFactory) hostname(abc.com)
      alter tcf(topicConnectionFactory) port(1414)
      alter tcf(topicConnectionFactory) qmanager(UK.abc)
      alter tcf(topicConnectionFactory) clientid(Message proc)

      def qcf(queueConnectionFactory)
      alter qcf(queueConnectionFactory) transport(client)
      alter qcf(queueConnectionFactory) channel(JAVA.CHANNEL)
      alter qcf(queueConnectionFactory) hostname(abc.com)
      alter qcf(queueConnectionFactory) port(1414)
      alter qcf(queueConnectionFactory) qmanager(UK.abc)
      alter qcf(queueConnectionFactory) clientid(Message Processor)

      chg ctx(=up)
      def ctx(topic)
      chg ctx(topic)
      def t(abc) tc(mq)

      (Also changed to topic to be mq rather than jms, makes no difference)
      ---



      On deployment I get the following problem:

      Caused by: javax.resource.spi.ResourceAdapterInternalException: Initialization F
      ailed
      at org.jboss.resource.adapter.jms.EndpointDelegate.prepareTopicConnectio
      n(EndpointDelegate.java:407)
      at org.jboss.resource.adapter.jms.EndpointDelegate.init(EndpointDelegate
      .java:261)
      at org.jboss.resource.adapter.jms.EndpointDelegate.(EndpointDelega
      te.java:71)
      at org.jboss.resource.adapter.jms.JmsResourceAdapter.endpointActivation(
      JmsResourceAdapter.java:95)
      ... 79 more
      Caused by: javax.jms.JMSException: Could not create a session: javax.resource.No
      tSupportedException: XA transaction not supported
      at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createSession(Jm
      sSessionFactoryImpl.java:110)
      at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createTopicSessi
      on(JmsSessionFactoryImpl.java:153)
      at org.jboss.resource.adapter.jms.EndpointDelegate.prepareTopicConnectio
      n(EndpointDelegate.java:381)


      ---

      If anyone has any clues I would be very grateful.

      thanks