3 Replies Latest reply on Jul 2, 2009 12:50 PM by jhalliday

    Transaction XIDs have zero gtrid_length

    mmusgrov

      When I start a transaction (obtained from JBossTM via theCosTransactions::TransactionFactory create method) the "global transaction id" has length zero - ie the bqual_length field of an XID structure is zero.

      This is causing a problem when try to issue an xa_start request on an Oracle RM. The oracle log reports:
      ORA-00160: global transaction length 0 is greater than maximum (64)

      My question Is: how do I configure the TM to get a non-zero global tx id?

      PS I am converting OTS tx ids to XIDs as follows:

       CosTransactions::Coordinator_var cv = ...
       CosTransactions::PropagationContext_var pcv = cv->get_txcontext();
       CosTransactions::otid_t otid = pcv->current.otid;
      
       ...
       xid.gtrid_length = otid.tid.length() - otid.bqual_length;
      


        • 1. Re: Transaction XIDs have zero gtrid_length
          jhalliday

          The bqual is the branch qualifier, not the tx id - which is in the tid field.

          • 2. Re: Transaction XIDs have zero gtrid_length
            mmusgrov

             

            When I start a transaction (obtained from JBossTM via theCosTransactionsgtrid_lengt::TransactionFactory create method) the "global transaction id" has length zero - ie the bqual_length field of an XID structure is zero.


            Sorry I meant ie the gtrid_length field of an XID structure is zero

            • 3. Re: Transaction XIDs have zero gtrid_length
              jhalliday

              Where are you getting the XID structure from, that's not a CORBA OTS level construct. If you are creating and populating it from the otid_t then the otid_t.tid field should contain a value of non-zero length that you can use, although it may have a zero length bqual element. Look at XidImple or XATxConverter for how the JBossTS system creates Xids if you want some inspiration.