Why am I getting JDBC XA errors when using JMS in conjunction with JDBC calls?
A. Whenever two resources (such as JMS and a database) participate in a transaction, the transaction becomes two-phase. The database driver you are using is not XA compatible and can’t normally participate in a two-phase transaction. The solution is to either use an XA compatible driver, or to configure the JDBCTxDataSource value to set enableTwoPhaseCommit to true. The caveat for the latter is that this can lead to heuristic errors. If you don’t want JMS to participate in the current transaction, see the question How can an application do a JMS operation and have it succeed, independent of the result of the transaction?.