5 Replies Latest reply on Sep 21, 2006 3:31 AM by K A

    Distributed transactions

    K A Newbie

      Hi,

      I have som questions about distributed transactions. When you say:

      "JBoss Transactions enables distributed transactions to span application server instances and multiple heterogeneous data sources, including JDBC databases and XA-compliant messaging systems."

      If I understand this right it should be possible to include database calls and RPC calls to a JBoss server (EJBs) in the same transaction? If this is the case, what protocol can I use for the JBoss server call? Is it only RMI/IIOP or can I use RMI/HTTP as well? If RMI/HTTP isn't possible can I use webservices in the same kind of fashion instead of EJBs?

      And a last question, is it possible to use the JBoss Transaction in a standalone java application not deployed in JBoss and make it call a database and a JBoss server in the same transaction scope?

      I would be greatful if you could point to where in the documentation I can read more about this.

      Thanks in advance

      /Klejs

        • 1. Re: Distributed transactions
          Jonathan Halliday Master

          Hello Klejs

          > If I understand this right it should be possible to include database calls and RPC calls to a JBoss server (EJBs) in the same transaction?

          Yes it is.

          > If this is the case, what protocol can I use for the JBoss server call? Is it only RMI/IIOP or can I use RMI/HTTP as well? If RMI/HTTP isn't possible can I use webservices in the same kind of fashion instead of EJBs?

          We don't currently support propagation of the transaction when using RMI/HTTP, so you'll need to stick with RMI/IIOP for now if you want to use the transaction support in EJBs. We do support Web Services transactions, but they will require a bit more hand coding to enlist resource such as EJBs or database connections into the transaction. That should change when our Web Services to JTS transaction bridge is released.

          > And a last question, is it possible to use the JBoss Transaction in a standalone java application not deployed in JBoss and make it call a database and a JBoss server in the same transaction scope?

          Yes it is.

          > I would be greatful if you could point to where in the documentation I can read more about this.

          The JTA and JTS programmer's guides should cover everything you need, but if you have any further questions please don't hesitate to ask.

          Hope this helps.

          Jonathan Halliday
          JBoss Transactions

          • 2. Re: Distributed transactions
            K A Newbie

            Thanks for your reply, I will try the Web Services option you mentioned but I have some question before I start.

            "We do support Web Services transactions, but they will require a bit more hand coding to enlist resource such as EJBs or database connections into the transaction."

            > What does this mean? Do I have to configure the Web Services in a special way? Can I read about this in the documentation? Are there any code and configuation examples?

            "That should change when our Web Services to JTS transaction bridge is released."

            > When do you think this will be available?

            Thanks

            /Klejs

            • 3. Re: Distributed transactions
              Jonathan Halliday Master

              Hi Klejs

              Interop between web services and jts transactions is more than just configuration at present. It will require you to write code to translate calls on the web services Participant into calls on an XA resource.

              It looks straightforward at first, but getting crash recovery right and dealing with the subtle differences between the two protocols is a bit of a headache. Unless you have, or are prepared to spend time acquiring, a strong understanding of both types of transaction, I would not recommend trying to put a home grown solution into production use.

              The topic is discussed in various research, including work by IBM and an MSc dissertation by the intern who wrote the prototype for our transaction bridge. However, it's not currently covered in our documentation.

              There is no timescale for release of the transaction bridge at present.

              Regards

              Jonathan.

              • 4. Re: Distributed transactions
                Jonathan Halliday Master

                This article from IBM is a nice introduction to the topic of transaction bridging.

                http://www-128.ibm.com/developerworks/library/ws-transjta/

                Jonathan

                • 5. Re: Distributed transactions
                  K A Newbie

                  Thanks for your replies, the article was very nice.

                  The problem I have is that we have three systems that has to be integrated together, A, B and C. System A and B is integrated with C which is a kind of management system. A user can be logged in to A and B at the same time and has a sticky session against system C. Because of performance issues with system C all user data is cached in system C (when a user logs on) and A and B always acces the same node in the "C cluster". We are using a http load balancer to achieve this and that's why I wanted to use RMI/HTTP or Webservices. While this isn't possible with todays implementation of JBoss, and distributed transactions, do you have any other idea on how achieve this?

                  Thanks!

                  /Klejs