Message Beans: Container Vs. Bean Managed Transactions, XA Transaction problem
December 27th, 2005I recently tried to get a container managed transaction message bean to read from a MQ queue then read from an oracle database. I got an error indicating that I did not have XA Transactions turned on in my MQ queue. Then I dug a little deeper….
This is what I found:
Bean Managed Transaction in Message Beans:
• Single threaded if more than one data source was used.
Container Managed Transaction in Message Beans:
• Multi threaded even if more than one data source was used, but slower due to XA Transactions.
The solution I found:
Use Container Management Transactions, but use a stateless session bean with bean managed transactions to access your second data source.
Message Beans, Java, MQ, Transactions