It will work correctly if DIRTY_READ transaction isolation mode is set.
It sends a message, but there is no warranty that consumer will receive a reply within the same transaction.
This code will not work because you are not allowed to call setJMSReplyTo before the message is sent.
It will throw an exception, because sends and receives are not allowed in a single transaction.
No message is actually sent until
the transaction is committed and the consumer will not receive any reply message.
It sends a message and receives a reply.
|