Atomikos Forum |
|
Hi.
The MessageDriverContainer does rollback the transaction if no message was received. Springs Container does commit the transaction if no message is received. Doing so will result in PREPARE and XA_RDONLY from ActiveMQ. Why Atomikos Container does the rollback? It could commit the Tx too, couldn't it? Doing a rollback will result in the transaction being marked rollback only and the complete JTA Tx gets rollbacked. But not receiving a message on the container is not a "fault" to me, isn't it? Changing the receiverThread Code to this: .... else if (Thread.currentThread() == current && msg == null) { Configuration .logDebug ( "MessageConsumerSession: Did not receive a message."); } else { commit = false; } does result in spring like behaviour and does not let my tx rollback. The Container hat its own default timeout too - couldn't it use the Timeout specified for the transaction itself (beside setting another value on the container)? thx for feedback about this :). |