4 Replies Latest reply on Dec 26, 2009 11:33 AM by mike.derren

    Distributed transaction in different ESB services

      I have 2 services ESBService1 and ESBService2. ESBService1 modifies data in a database, then call ESBService2. ESBService2 modifies data in the same database. While ESBService2 works with the database, error occurs and the transaction is rolled back.  It is necessary ESBService1 to roll back data in the DB too. How?

      Asynchronous calls do not allow to work with distributed transaction. Synchronous call throws an exception.

      Help me, please.

        • 1. Re: Distributed transaction in different ESB services
          camunda

          Hi Mike.

           

          Basically relying on distributed ACID-Transaction in the SOA world isn't a good idea at all. Basically this is the "power" of the whole concept: If you make it asynchronous, you have to think of solving these kind of problems differently, not with technical transactions (like compensating actions, ...), which makes the whole architecture more open for later changes.

           

          But anyway, if you change to InVM transport it should be possible to span a Java-Transaction over multiple service calls and using a single rollback. But please be aware, that this is not really "the SOA way" and it has downsides in the terms of architecture...

           

          Cheerio and merry christmas

          Bernd

          • 2. Re: Distributed transaction in different ESB services

            Thanks, Bernd, for your answer!

            I will take your advice. This will need to try to work with InVM courier.

             

            you have to think of solving these kind of problems differently, not with technical transactions (like compensating actions, ...)

             

             

             

             

             

            It`s good idea too. But we need to make a lot of data changes in one or more databases in different ESB services, and all changes must be in a single distributed transaction.

            • 3. Re: Distributed transaction in different ESB services
              camunda
              Okay, just wanted to make the remark, you should be open to look for different possibilities to get around the technical transactions if you want to arrive in the SOA world ;-)
              • 4. Re: Distributed transaction in different ESB services
                Thank you, Bernd.