Except that the type of message I'm sending depends on whether the database transaction was successful, and if I use CMT I won't be able to know that.
JTA doesn't support nested transactions so you're safe on that front no matter what you do.
Except that the type of message I'm sending depends on whether the database transaction was successful, and if I use CMT I won't be able to know that.
I'm not really sure what you mean there, if its atomic the message wont get sent if the DB fails ( a heuristic being the caveat here)
Andy Taylor wrote:
Except that the type of message I'm sending depends on whether the database transaction was successful, and if I use CMT I won't be able to know that.
I'm not really sure what you mean there, if its atomic the message wont get sent if the DB fails ( a heuristic being the caveat here)
Yes, that was the problem. I wanted to send a message on database failure, just a different one. We put the error message from the failed database transaction into the object from the incoming message before putting it on to an error queue, so an atomic transaction that would just fail n times and then put the message on an error queue isn't what i wanted. Either way, I'm satisfied how things turned out, and I've learned to set up XA even though I ended up not using it. Your help was valuable and much appreciated.