Transactions and Compensation

Home Page Forums BizTalk 2004 – BizTalk 2010 Transactions and Compensation

Viewing 1 reply thread
  • Author
    • #14965

      Hi All,

      I have reading an article about BizTalk transaction types and I have some questions:

      Let’s say im inserting a record to SQL SERVER and after insert success, my orchestration is terminating. (xlang exception for example)
      Is the insert command will roll back? Is I matter if it’s Atomic or long running?
      As far as I read, atomic is like commit\\rollback but long running is not

      If so, why should I use \”Compensation\” in atomic scope if BizTalk itself is rolling back ?

      Also I read \”[i:15cae91fef]Indeed, all transactions have a compensation block. If the orchestration designer does not explicitly create one, BizTalk creates an implicit compensation block[/i:15cae91fef]\”
      What does it mean? Should I have some rollback mechanism also for long running transactions?

      As u can see I confusedif someone can pull some light on those issues I will be thankful

      Thanks in advance,

    • #14964

      If you use the SQL adapter, a \”send\” that succeeds is committed and won’t get rolled back if the orchestration fails later. You’d want to have \”compensation\” code that could remove that just-inserted record if something failed later on.

      Now if you call a component containing ADO.NET code to do the insert, and something fails later in the same atomic scope, I’m fairly sure that the transaction would roll back that SQL command.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.