DTC Error

Clovertech Forums Cloverleaf DTC Error

Tagged: 

  • Creator
    Topic
  • #119028
    Jerry Tilsley
    Participant

      All,

      Trying to setup a DTC protocol to get a better understanding on how it works.

      I’m getting the error:
      stagesetmsg failed — bad msgId “A”

      But when I echo the message handle prior to this I get the expected message0.  Where is this “A” coming from?

      Thanks,

      Jerry

    Viewing 0 reply threads
    • Author
      Replies
      • #119030
        Don Martin
        Participant

          Here is how we use the staging DB in a DTC flow:
          keylget args MSGID mh
          stagesetmsg $keyspace messageHandle $mh

          keyspace is typically set to the something like DTC_{{transactionId}} You can get the transaction ID from from the message metadata under DRIVERCTL > DTCCTX > XID

          Then we retrieve the message handle like this:
          set mh [stagegetmsg $keyspace messageHandle]

          If that doesn’t work, try posting your code to the forum.

          Here are a couple of other things about DTC that I have seemed to notice. Maybe others don’t agree, or I’m overlooking something, but I’ll put it out there as it might be helpful.

          Every time the DTC thread is saved, if a raw reply route doesn’t already exist for any threads that are being used with the DTCSEND disposition, a new raw route is created. That’s fine if you only intend to use raw reply routes for the replies sent back to the DTC thread, but if you are using an xlate reply route, this will cause a problem – you’ll need to manually delete the raw reply route from each thread using an xlate reply route every time you save changes to the DTC thread.

          The staging DB API for stagegetkeys doesn’t work – doesn’t seem to exist in cloverleaf, however, stageremovekeyspace does work.

          We typically enclose all of our .tcl code in a catch statement to handle looping issue/bug in DTC if thread is stopped during a transaction.

          We try not use two DTC threads in the same flow or same process. We were getting some strange timing issues/race conditions when we did this. I can’t say for sure that it was due to DTC.

           

          Hope that helps.

          Don Martin

          Sanford Health

      Viewing 0 reply threads
      • You must be logged in to reply to this topic.