Bryan

> However, I am still having issues when utilizing session transactions.  I 
> stated earlier in this thread that session transactions were working
> correctly for me.  That really wasn't accurate.  The issue I keep running 
> into is when I try a session commit (either after receiving or sending a
> message) and a failover is in progress the session.commit() raises a 
> JMSException and I don't believe it should.

No, this is not correct.  When using failover and transactions
together, you need to be prepared to handle
TransactionRolledBackException [1].  If a failover occurs during the
scope of a JMS Transaction, any work performed by that transaction is
probably lost. The application is made aware of this loss by way of
the TransactionRolledBackException from the Session#commit() call.
Applications utilising failover must be prepared to catch this
exception and respond by repeating the work. Remember, the system as a
whole is giving you an at-least once guarantee. There are failure
scenarios where duplicates can arise. For instance if the successful
response to the tx.commit is lost during the communication breakdown.

I think this will probably explain why your application was
terminating after failover when you expected it wouldn't.

https://docs.oracle.com/javaee/6/api/javax/jms/TransactionRolledBackException.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to