1. Most part is true, but, the old tx is not suspended.
It is only when the old Tx is committed that the message is sent to the destination.
The old transaction, caller initiated one, will be suspended because onMessage(...) will not run in the scope of client's transaction. It either runs in a new (for CMT) or unspecified (CMT) or self initiated (BMT) transaction scope.
2. Most part is true, but, the message is put on the queue/topic only after the ut.commit().
The message reaches the MDB but if the executeQuery() should fail, the container cannot rollback the sent message. MDB has its own transaction.
3. Not sure what exception will be received.
No exception will be thrown. There won't be anything to rollback because whatever the bean had to commit has been committed already. Calling rollback() immediately after commit() is a NO-OP; it does not rollback() the committed transaction either.
[ March 12, 2005: Message edited by: Keerthi P ]