Mar 6th, 2008, 12:57 AM
JMS Remoting & XA
We are rewriting a EJB application to a standalone app and use JMS remoting to invoke a business implementation. We are using the JMSInvokerProxyFactoryBean to retrieve an instance of the bean to invoke the business impl and DefaultMessageListenerContainer to consume & process the requests.
We would like this remoting call to participate in a XA transaction. I was able to integrate atomikos JTA Transaction Manager implementation with the Spring JTA TransactionManager property in the DefaultMessageListenerContainer. However i am not sure how do i have the client participate in the XA transaction?
Any pointers would be really helpful.
I looked at this article from Javaworld to integrate atomikos into the DefaultMessageListenerContainer.
Thanks in advance
Mar 6th, 2008, 09:38 AM
I don't believe you can drive an XA transaction from the client since you are inserting into a JMS queue. If you were to use a XA transaction on the client it would a separate transaction from the processing of the JMS request.
If you wanted to use XA for this request from the client you'd need to use remoting which supports this. I believe EJB would be the only way to accomplish this.
Mar 7th, 2008, 05:31 AM
Thanks for your response.
I think the basic problem is that Transaction cannot be propagated across a Q. I need to do away with JMS if i need to retain transaction information.
Mar 8th, 2008, 04:22 PM
Remoting via JMS
Atomikos _does_ support remoting transactions via JMS, but you need ExtremeTransactions (the commercial variant) to do that.
With it, you can invoke services via JMS and rollback across multiple of such services (which is not possible with default JMS/XA semantics).