I am confused on how to accomplish what I want to do.
I have a JMS Queue with an MDB attached to it. I have Container Managed JTA transaction with my MDB onMessage.
What I want to be able to do is to put something on a second queue regardless of whether my onMessage in the first queue succeeds.
For example, i want to audit a failure and my audit logging is implemented via a JMS queue. So, a failure occurs, I want to rollback my current transacation but before I do that, I want to audit that by adding something to an additional queue.
any ideas. Right now I have all queues CMT with JTA
When sending to your audit queue, do so on a connection using the non XA connection factory at /ConnectionFactory.
If you don't use the XA connection factory (java:/jmsXA) then the work won't be enlisted in your global transaction.