I agree with you, for MDB with BTM the message recipient is not part of the transaction. For this in order to get a message redelivery a system exception is required.
What I don't understand is the (system) exception occurs in the timeout method, so from this point of view the container does:
- 1. Log the exception
2. Discard the bean instance
3. Out timer is a multi-fire (call multiple times) timer, it was created in the onMessage method without any exception (that may roll back the timer creation) so, the involved MDB is still register like timer.
4. According with the specification 18.4.3.
so in short the container will trigger the timeout..........The container must retry the timeout after the transaction rollback.
Timers are persistent objects (unless explicitly created as non-persistent timers). In the event of a container crash or container shutdown, any single-event persistent timers that have expired during the intervening time before container restart must cause the corresponding timeout callback method to be invoked upon restart. Any interval persistent timers or schedule based persistent timers that have expired during the intervening time.
Thanks in advance,
Mihai