camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell <nox...@gmail.com>
Subject Camel JMS Component With XA transaction Manager connection to IBM MQ problem
Date Fri, 05 Apr 2013 03:31:52 GMT
Try to use Camel JMS component to connect MQ Series using Websphere XA
transaction Manager 

Here is my setting. 
	<bean id="MQSeries" class="org.apache.camel.component.jms.JmsComponent">
		<property name="transacted" value="false" />

		<property name="transactionManager" ref="transactionManager"/>

		<property name="connectionFactory" ref="connectionFactory" />
		<property name="deliveryPersistent" value="${delivery.persistent}" />
		<property name="timeToLive" value="${time.to.live}" />
		<property name="concurrentConsumers" value="${jms.concurrent.consumers}"
/>
		<property name="taskExecutor" ref="taskExecutor" />
		<property name="cacheLevelName" value="CACHE_NONE" />
		<property name="receiveTimeout" value="#{${jms.receive.timeout.in.seconds}
* 1000}" />
		<property name="recoveryInterval" value="#{${jms.recovery.time.in.seconds}
* 1000}" />
		<property name="destinationResolver" ref="jmsDestinationResolver" />
	</bean>


Got exception. 

2013-04-05 10:47:19,202 [WorkManager.OTCWorkManager : 3] WARN 
com.anz.otc.jms.ExponentialBackOffMessageListenerContainer - Setup of JMS
message listener invoker failed for destination 'jms/OTCFXregrepQ' - trying
to recover. Cause: JTA transaction unexpectedly rolled back (maybe due to a
timeout); nested exception is javax.transaction.RollbackException
org.springframework.transaction.UnexpectedRollbackException: JTA transaction
unexpectedly rolled back (maybe due to a timeout); nested exception is
javax.transaction.RollbackException
	at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1013)
	at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
	at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:258)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1071)
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:965)
	at
org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:61)
	at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:264)
	at java.security.AccessController.doPrivileged(AccessController.java:224)
	at javax.security.auth.Subject.doAs(Subject.java:495)
	at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:131)
	at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:89)
	at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:335)
	at java.security.AccessController.doPrivileged(AccessController.java:251)
	at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1146)
	at
com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:199)
	at com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:188)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: javax.transaction.RollbackException
	at
com.ibm.tx.jta.TransactionImpl.stage3CommitProcessing(TransactionImpl.java:1225)
	at com.ibm.tx.jta.TransactionImpl.processCommit(TransactionImpl.java:999)
	at com.ibm.tx.jta.TransactionImpl.commit(TransactionImpl.java:920)
	at com.ibm.ws.tx.jta.TranManagerImpl.commit(TranManagerImpl.java:436)
	at com.ibm.tx.jta.TranManagerSet.commit(TranManagerSet.java:161)
	at
com.ibm.ws.tx.jta.UserTransactionImpl.commit(UserTransactionImpl.java:293)
	at
org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1010)
	... 17 more

If I change setting to 
	<bean id="MQSeries" class="org.apache.camel.component.jms.JmsComponent">

		<property name="connectionFactory" ref="connectionFactory" />
		<property name="deliveryPersistent" value="${delivery.persistent}" />
		<property name="timeToLive" value="${time.to.live}" />
		<property name="concurrentConsumers" value="${jms.concurrent.consumers}"
/>
		<property name="taskExecutor" ref="taskExecutor" />
		<property name="cacheLevelName" value="CACHE_NONE" />
		<property name="receiveTimeout" value="#{${jms.receive.timeout.in.seconds}
* 1000}" />
		<property name="recoveryInterval" value="#{${jms.recovery.time.in.seconds}
* 1000}" />
		<property name="destinationResolver" ref="jmsDestinationResolver" />
	</bean>


I connection is oK. But I don't think it use websphere JTA transaction
manager, but local jmsTransactionManager. That's not what we want. 

Anyone got any clue?
Thank you in advance



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-Component-With-XA-transaction-Manager-connection-to-IBM-MQ-problem-tp5730376.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message