3 Replies Latest reply on Oct 10, 2012 10:51 PM by Ramesh Reddy

    txId is always null in the command log

    sivajd Newbie

      What settings have to be set in the transaction manager so that the txId gets a  non null value in the teiid command log ? I would also like to know where I can find the documentation for this. What does the sourceCommandID mean here ? Given below is a couple of transactions from the commandLog. Thanks in advance for your help.

       

      Thanks

      Siva

       

      15:00:30,618 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue1114)   START DATA SRC COMMAND: startTime=2012-10-09 15:00:30.618       requestID=rqM2eG2Z76ed.0        sourceCommandID=0       txID=null       modelName=5000_10       translatorName=powerhub sessionID=rqM2eG2Z76ed  principal=user@dsds-security-domain     sql=SELECT g_0.policy_id, g_0.create_app_id, g_0.create_date, g_0.create_user_id, g_0.customer_address, g_0.customer_division, g_0.customer_group, g_0.customer_is_readonly, g_0.customer_name, g_0.customer_remarks, g_0.customer_representative, g_0.customer_telephone, g_0.password_1, g_0.password_2, g_0.reporting_standard, g_0.reporting_time, g_0.rpt_standard_description, g_0.update_app_id, g_0.update_date, g_0.update_user_id FROM "5000_10".ds_company AS g_0

       

      15:00:50,543 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue1136) END SRC COMMAND:        endTime=2012-10-09 15:00:50.543 requestID=rqM2eG2Z76ed.4        sourceCommandID=0       txID=null       modelName=5000_10       translatorName=powerhub sessionID=rqM2eG2Z76ed  principal=user@dsds-security-domain     finalRowCount=0


        • 1. Re: txId is always null in the command log
          Ramesh Reddy Master

          Siva,

           

          How many sources does your query involve? If there is only single source involved then there may not be a transaction involved. For checking it is the case try adding autoCommitTxn=ON and use autoCommit = true on your jdbc connection. This should force a transaction on every query. Note you would have to define XA datasource for your connection to your source.

           

          As per the sourceCommandID, this is sequence id as to how many source requests that to Teiid engine is making to a source in the scope of a given query, also serves as identifier of that source query.

           

          Ramesh..

          • 2. Re: txId is always null in the command log
            sivajd Newbie

            Ramesh,

             

            Thanks for your prompt reply. I have a couple of quick questions. With the above settings I am able to see the following attributes getting logged.

             

            time, requestId, txID, sessionId, applicationName, principal, vdbName, vdbVersion, sql.

             

            Could you please point me to more documentation on "requestId", "txID", "sessionId" ? If you cannot point to specific references, any explanation from you would be of tremendous help.

             

            Now in the log for the txID, I see the structure given below. Could you shed more light on this txID's BasicAction structure ? What does it mean by ActionStatus:RUNNING  ?

             

            txID=TransactionImple < ac, BasicAction: 0:ffff22ee5453:-228bbdba:5076064a:222 status: ActionStatus.RUNNING >

             

            Thanks for your help.

             

            Siva

            • 3. Re: txId is always null in the command log
              Ramesh Reddy Master

              Siva,

               

              requestId = Request ID. Every query you submit has unique identifier it shows that

              txID = Transaction ID, if distributed trasaction started then it show that number

              sessionId =  Session ID; Every connection gets a unique sesion id; A user identified with it

              applicationName = You can assign a custom name during the connection to identify a the type connection

              principal = Name of user logged in

               

              txnId = string form of javax.transaction.Transaction object. I am not sure what internal status really mean. Running = txn active?

               

              Ramesh..