2 Replies Latest reply on Jan 12, 2007 2:09 PM by rookie1977

    Keeping track of global Xid-local Xid mappings

    rookie1977

      Scenario: I have server side system using XA capable RDBMS with XA capable JDBC driver and I want to expose my services using JBoss XTS.

      Am I wrong when I say that I, as a Durable2PCParticipant implementor, must keep track which global transaction ID genereted by transaction initiator external to my system, maps to which Xid in my system. I retrieve global transaction ID via (UserTransactionFactory.userTransaction().toString()),
      however, if I use JTA/JTS capable transaction manager on my server side to communicate with the XA database, JTA/JTS API does not have means to get Xid generated by transaction manager.

      So it seems to me, and I hope that I am wrong, Durable2PCParticipant implementation must communicate with XAResource, and XAResource methods require Xid, and since global Xid may not be the same as one generated by my transaction manager, I must keep track of the globalTrId->myTrId mappings, and I must take the role of the transaction manager (perhaps adjusting one of the open source projects).

      Thanks guys in advance

        • 1. Re: Keeping track of global Xid-local Xid mappings
          marklittle

          If you want to bridge between Web Services transactions and JTA/JTS transactions, then what you outline needs to be done. That's what we term "end-to-end transactions".

          Ideally you'd like this to happen transparently, so you don't have to worry about spanning transactions from WS-to-JTS or JTS-to-WS: it just happens (tm). We had this in place back when this was the ArjunaTS (or a poc), but it hasn't had the priority to move it/complete it within JBossTS just yet (http://jira.jboss.com/jira/browse/JBTM-44). The hooks are already pretty much in place for this though, and JSR 156 defines the standard way to do this, or will once it's complete!

          Feel free to vote for the JIRA task. I suspect this will happen sooner rather than later.

          • 2. Re: Keeping track of global Xid-local Xid mappings
            rookie1977

            Thank you Mark for clarifying this.

            Regards