Page 1 of 1

Finding an uncompleted Transaction State

Posted: Fri Jan 24, 2020 8:26 am
by Stokes
Something, somewhere is leaking a transaction state and I'm not sure on the best way to find this. We only get notified of this issue the next time they either showModal on a form (and they are in transaction state), or a message box pops up or if we try to start another transaction state. By that time the original problem has been and gone.

We haven't reimplmented beginTransaction, commitTransaction etc so I can't put logging in there for certain users that have this problem. Anyone got some bright ideas on how to find this?

Re: Finding an uncompleted Transaction State

Posted: Fri Jan 24, 2020 9:06 am
by BeeJay
I'd start by looking for any exception handlers which return an Ex_Abort_Action without also aborting transaction state.

If you have any exception handlers that do this, then that could definitely result in the process being left in transaction state. Returning an Ex_Abort_Action would mean any commitTransaction or abortTransaction statements which are not in an epilog will not get executed as the stack gets cut back by the Ex_Abort_Action return. The process then has the potential to be left in transaction state unless it's an exception where the JOM will automatically abort the transaction itself, for referential integrity purposes, if your exception handler(s) don't abort the transaction.

Cheers,
BeeJay.

Re: Finding an uncompleted Transaction State

Posted: Fri Jan 24, 2020 10:40 am
by Stokes
great, thanks for that will try that one out as a starting point