The situation will be complicated if you're using the failover transport. Your commit on the session can be failed in the following cases: 1.The commit command is failed to send to the broker because the connection between your client and broker is broken and timeout for reconnection process happens .You will receive a exception indicating failover is of timeout.You can continue to retry to commit the transaction and you can success once the connection is re-established. The client can track the outgoing transaction and it's messages . No matter whether your broker is restarted or not, messages of that transaction will be replayed when the connection is re-established. If your broker is not restarted and has disabled message audit you may see duplicated messages. 2. The commit command is successful to send to the broker but the client fails to get response from the broker because the connection between the client and broker is broken.Once the connection is re-established you will receive a TransactionRollbackException indicating that the client can not determine the commit of the transaction is successful or not. You cannot commit that transaction anymore and you can start a new transaction to resend the messages. If your broker is not restarted those messages of the failed transaction will just stand in memory and can not be released except session/connection is closed.
Thanks for clarification if my supposition is wrong. At 2013-05-27 16:50:46,bizcenter <bizcenter...@gmail.com> wrote: >Forgive my poor english. > >In JMS transaction, messages sent will be persisted( stored in db) before >session.commit() is fired? > >Assume that the session.commit() failed, then the broker is stopped : > 1. where are messages sent? > 2. The broker starts in the future, if i can do session.commit() >operation? > > >Thansk! > > > > > >-- >View this message in context: >http://activemq.2283324.n4.nabble.com/activemq-transaction-tp4667500.html >Sent from the ActiveMQ - User mailing list archive at Nabble.com.