Transactions problem

Hi,

I’m experiencing (well: my customer is experiencing it; I can’t reproduce it and this is the most annoying part of the problem) a weird behaviour probably related to transactions.
They use an agenda solution very similar to the example describe on servoy magazine http://www.servoymagazine.com/home/2005/02/article_how_to_.html
I added a transaction whenever they create or edit a new appointment: the transation begins, a formindialog is opened and
if the CONFIRM or DELETE button are pressed, the transaction is committed (the record is saved or deleted)
if the user clicks CANCEL or closes the formindialog, the transaction is rolled back.
THE PROBLEM:
I cannot explain why (but I saw it happen, even if I can’t reproduce it and the logs are not showing any error), but sometimes there are transactions still pending even if there’s no formindialog open (how can this happen if I tie the transaction to a formindialog and only this part of my solution uses transactions?) and the client stops working because the transaction is blocking any other interaction with the solution.

THE QUESTION:
Since I’m not able to reproduce it (I also sent the file to the dev team, but the problem doesn’t show up): is there anybody else who experienced strange reproduceable behaviour with transactions? :-)

Thanks in advance

You say you use a formInDialog.
Did you block the option to close the dialog with the X?
If not then this will close the dialog and keep your transaction alive.

Marcel Trapman posted a tip on Servoy Magazine how to block this option.

Hope this helps.

ROCLASI:
You say you use a formInDialog.
Did you block the option to close the dialog with the X?
If not then this will close the dialog and keep your transaction alive.

Marcel Trapman posted a tip on Servoy Magazine how to block this option.

Hope this helps.

Yes, I had the exact the same problem. I forgot to block the X of the window, so the transaction stayed open! :oops:

ROCLASI:
You say you use a formInDialog.
Did you block the option to close the dialog with the X?
If not then this will close the dialog and keep your transaction alive.

Marcel Trapman posted a tip on Servoy Magazine how to block this option.

Hope this helps.

No: I didn’t block it because I rollback the transaction, if the formindialog is closed: so there should be no way to leave a pending transaction.

So you rollback at the onHide event?

ROCLASI:
So you rollback at the onHide event?

Exactly :-) I use:

if ( databaseManager.hasTransaction() )
{
databaseManager.rollbackTransaction()
}