| [news.eclipse.tools.emf] Re: [CDO] CDOSavePoint and rollback question |
Yes, that is what I meant. I am designing my app at the moment for single user, but keep a multi user setup in the back of my mind.I exercised a small example with a CDO model, a view that displays model data and a wizard that adds or modifies data. As you certainly do, my wizard creates a CDOSavePoint hen it is initialized. When the wizard is canceled, the transaction is rolled back to the savepoint. When the wizard performs finish, the transaction is committed. As wizard modifications of the model would trigger UI updates in the view, I open a separate transaction from where I retrieve model objects that are passed to the wizard. All modifications are isolated until the wizard commits the transaction. After the wizard dialog is closed, the wizard transaction is closed, regardless of the dialog's return code.
CDO makes this very easy, but it also has many advantages for single user applications.
I use the rollback for example to undo all changes of a bigger model that is modified by a large wizard dialog when the cancel button is pressed.
Kind regards, Sebastian