Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » rolling back a transaction manually
rolling back a transaction manually [message #816195] Thu, 08 March 2012 14:36
Sven Krause is currently offline Sven KrauseFriend
Messages: 119
Registered: July 2009
Senior Member
Hi,

how can I rollback an nested transaction programatically?

In detail: I have to have an wizard that is opened during an command
(AbstractEMFOperation) execution. This wizard allows the user entering
some parameters. The wizard creates a sequence of commands (depdendent
on the parameters), executes them and present an review page where the
user might change additional things on the wizard subject (EObject
having various children). The user might step back in the wizard to
change the parameters and step forward again to the result page. What
I'm doing: I'm wrapping the wizard forward processing as list of
AbstractEMFOperations, which I'm undoing, if the user goes back in the
wizard.

The problem happens, if such AbstractEMFOperation has been undone and
the user closes the dialog. In this moment the main command will be
rolled back too, but the changes list might be corrupt and I'm getting
an IndexOutofBoundsException somewhere in the changes applyAndRevert
method. The issues raises because of the sucessful execution of an
EMFOperation merges the changes recorded by the sub transaction into the
enclosing transaction. Finally the sub AbstractEMFOperations are not
really rolled back, independent, if I call undo or not.

Is there a better way to wrap AbstractEMFOperations in a running command
and undo them under own control?

Thanks in advance,
Sven
Previous Topic:[Texo] How difficult would it be to add JPA implementors annotation models ?
Next Topic:[Texo] Don't understand JPA generation strategy on bidir relation 0..1 to 0..*
Goto Forum:
  


Current Time: Thu Apr 25 13:52:30 GMT 2024

Powered by FUDForum. Page generated in 0.02227 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top