Atomikos Forum

MQSeries 6.0 XA issue

Hi,

I am setting up an XA test using Atomikos 3.3.1, IBM MQ 6.0 and Spring 2.0.
Here is the Spring configuration I'm using:


<bean id="mqConnectionFactory" class="com.ibm.mq.jms.MQXAQueueConnectionFactory">
        <property name="queueManager" value="MYQMGR"/>
        <property name="hostName" value="myhost"/>
        <property name="port" value="1430"/>
        <property name="channel" value="CH.MYQMGR.SRVC"/>
        <!-- transportType=1 for TCP client -->
        <property name="transportType" value="1"/>
        <property name="clientID" value="mqm"/>
    </bean>

    <bean id="atomikosMqConnectionFactory" class="com.atomikos.jms.QueueConnectionFactoryBean">
        <property name="xaQueueConnectionFactory" ref="mqConnectionFactory"/>
        <!-- IMPORTANT: the resourceName MUST contain MQSeries_XA_RMI -->
        <property name="resourceName" value="My_MQSeries_XA_RMI"/>
    </bean>

    <bean id="jmsQueueConnectionFactory" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
        <property name="targetConnectionFactory" ref="atomikosMqConnectionFactory"/>
        <property name="username" value=" "/>
        <property name="password" value=" "/>
    </bean>

    <bean id="inputQueueMessageListenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer" lazy-init="false">
        <property name="connectionFactory" ref="jmsQueueConnectionFactory"/>
        <property name="destination" ref="myQueue"/>
        <property name="messageListener" ref="myQueueMessageListener"/>
        <property name="transactionManager" ref="xaTransactionManager"/>
        <property name="concurrentConsumers" value="1"/>
        <property name="sessionTransacted" value="true"/>
    </bean>

    <bean id="myQueue" class="com.ibm.mq.jms.MQQueue">
        <property name="baseQueueManagerName" value="MYQMGR"/>
        <property name="baseQueueName" value="MYQUEUE"/>
    </bean>
   
    <bean id="myQueueMessageListener" class="com.itp.gt.queue.MQQueueListener"/>

My listener simply logs the message to the console but after the first message is logged I am getting the following JMS Exception:

javax.jms.JMSException: MQJMS1068: failed to obtain XAResource

Can anyone help me figure out what I am doing wrong?

Thanks,
naor
Naor Yuval Send private email
Sunday, June 15, 2008
 
 
correction: the exception is thrown when attempting to read the first message.
Naor Yuval Send private email
Sunday, June 15, 2008
 
 
Hi,

Can you find any underlying errors in the queue manager itself (i.e. on the server side)?

Guy
Guy Pardon Send private email
Sunday, June 29, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics