04-29-06 12:17 PM
> In this scenario I want to make two database changes and rollback them
> back
> if something goes wrong. I do not wand to write compensations for the
> actions I want to use ACID scope for the updates. This is simple using
> something like DTS, i.e. it will automatically rollback on failure.
>
> I want to be able to do then following:
>
> Orchestration:
>
> Receive PO
> |
> Expression Update SQL Via .Net Method call
> |
> Expression Update SQL Via another .Net Method call
> |
> Stop
>
>
> I have a simple scenario where I want to call two separate .Net functions,
> each of which update a row in a table.
>
> Is there an example where two separate DB records are updated from within
> two separate .Net component call from an orchestration with acid scope
> that
> are then rolled back?
Just make your .NET components ServicedComponents in COM+ that support
transactions (i.e. mark them with the transaction attribute [Transaction
]
and make sure you use the correct APIs or attributes to control transaction
outcome in their methods).
Once you do that, BizTalk will automatically create a DTC transaction for
your Atomic scope and extend that to the .NET components (and thus to your
database actions).
There are plenty of examples out there that show how to build transactional
.NET ServicedComponents, any should do the trick.
--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/
[ Post a follow-up to this message ]
|