|
| Hi
I posted this and didn't get any answers so thought I'd try again.
Hi
I am having trouble working out how compensations work. I have a send port
within a scope. The send port has delivery notification turned on. If i
make the scope long running then if the transaction fails, the compensation
handler is not invoked. If i make the scope atomic then the compensation
handler is invoked.
Why are they different? In the case of an atomic transaction, how can you
roll anything back if the transaction didn't succeed?
Can someone please give me some help with this.
Thanks,
Rob
If i make a scope atomic and lets say it contains a send port with deli on
atomic transactions.
I have two atomic transactions both calling sql sps each with compensation
blocks.
The send ports used to call sql have delivery notification enabled. If the
second transaction fails (violation of primary key) its compensation handler
is invoked (as well as the first transactions handler.
I thought that the compensation block should only run if a transaction is
successful?
So it is failing an insert and then deleting a record through the
compensation code.
Can someone please help?
|
|