3 Replies Latest reply on Apr 13, 2003 7:29 PM by Sacha Labourey

    Transactions

    eyfelit Newbie

      Hello!
      I have the next problem:

      I have the three JVM (JVM1, JVM2, JVM3) on JBoss at the different computers.

      On JVM1 run the transaction that change the date in database, then goto the JVM2 and run change the date in database, and then goto the JVM3 change the date in database.

      How can I do this in one transaction.

        • 1. Re: Transactions
          Darran Lofthouse Master

          As I understand it at the moment, all three of your JBoss nodes will need to share the same database so that changes made by one node will be visible to all other nodes.

          I think that there is work in progress so that each node will be able to have its own database and updates will be replicated across the nodes.

          • 2. Re: Transactions
            Bela Ban Master

            So you want the same transaction to change data in the DB ? You need to look into XA (distributed transactions). In that case you could enroll JVM1 2 and 3 in the same XA, make the changes, and commit.

            I think XA is not really stable (at least the Tyrex impl of it) in 3.2. Should have been fixed in JBoss 4.0 afaik.

            If this is what you want check the CMP or Transaction forum for how to do it.

            Bela

            • 3. Re: Transactions
              Sacha Labourey Master

              you need XA. Do you really want to do that, I mean, is that mandatory? It will simply not scale and kill your performance.