As you have found, XA is not a panacea.
Although you get ACID properties (albeit with much overhead) the resources are still (eventually) committed separately, causing the issue you are seeing.
You might want to consider using Spring Transaction Synchronization instead, where the JDBC transaction will be committed first, immediately followed by the JMS transaction. There is, however, a small possibility of a failure between the two commits, which means you might have to code for the possibility of duplicate messages.
See Best Effort 1PC in http://www.javaworld.com/javaworld/j...nsactions.html.
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware