Appropriate use of JMS Transactions


EJB programming & troubleshooting: Appropriate use of JMS Transactions

  1. Appropriate use of JMS Transactions (1 messages)

    I'm trying to explore the options of implementing a 2 phase commit transaction where database A updates a row and triggers an event to B,C and D to also update. If any of B,C and D fail, A should also rollback. I know how to do this with JDBC and I'm wondering if using JMS transactions is an option. The reason I am thinking of JMS transactions is because of the pub/sub aspect, I DO NOT want to resort to database integration techniques (ie. JDBC) to tightly integrate the systems. In JMS, does the sender get notified of a failed message?
  2. I'm slightly confused about your question but it is possible to combine JDBC and JMS transactions. For instance, it is possible to write to a database and a JMS topic within a single transaction and have the JDBC call roll back if the JMS write fails. This is explained well in the book "Enterprise JMS Programming" by Shaun Terry. Hope that helps. Andy Grove