Global XA transaction SwiftMQ + MySQL

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Global XA transaction SwiftMQ + MySQL

Karl Cassaigne
Hi there,

I'm using Tomcat 5.5, MySQL 4.1 and SwiftMQ HA 6.1.0 and I would like managing global XA transactions including SwiftMQ + MySQL processing (consume message from SwiftMQ and insert data into MySQL in a single global transaction).

Is there a way to achieve that considering that SwiftMQ HA includes the XA extension swiflet ?

Best regards
Reply | Threaded
Open this post in threaded view
|

Re: Global XA transaction SwiftMQ + MySQL

IIT Software
Administrator
Yes. Either drive the XA stuff yourself by using our XAResouce or (better) use the Atomikos Transaction Manager. It's standalone and should work with SwiftMQ. I remember they tested it with SwiftMQ (though we did not).
Reply | Threaded
Open this post in threaded view
|

Re: Global XA transaction SwiftMQ + MySQL

Karl Cassaigne
Thank you for the link, I will give it a try.
Reply | Threaded
Open this post in threaded view
|

Re: Global XA transaction SwiftMQ + MySQL

Karl Cassaigne
In reply to this post by IIT Software
It seems I need to get an instance of XAQueueConnectionFactory to be able to use the Atomikos Transaction Manager.
Can you give me a way to achieve that without using a JCA connector ?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Global XA transaction SwiftMQ + MySQL

IIT Software
Administrator
You can cast any SwiftMQ connection factory to a XAQueueConnectionFactory:

XAQueueConnectionFactory qcf = (XAQueueConnectionFactory)ctx.lookup("plainsocket@router1");