Hi Stephen,

Stephen Ting wrote:
Can i programatic rollback managed transaction in ODMG api?

I have the following challenge.

1. ((NarrowTransaction)tx).markDirty(document1);
2. ((NarrowTransaction)tx).markDirty(subDoc1);
3. ((NarrowTransaction)tx).markDelete(subDoc2);

In the above sequence, says I excute statement 1 and 2 successfully,
before reaching statement
3 I detected some errors and need to exit the method and rollback. In my
testing, the
SQL Statement in 1 and 2 will get excuted.
What do you do when the error was detected?
Did you call sessionContext.setRollbackOnly() ?
Could you post some pseudo code?

Normally 1 and 2 shouldn't be executed when all method
calls made in a cm-tx.

regards,
Armin

My question is can I rollback
sql statement 1 and 2 and assume I didn't mark document1 and subDoc1?

Thanks

Regards,
Stephen Ting


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to