Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » How to unregister a TransactionalEditingDomain?
How to unregister a TransactionalEditingDomain? [message #605006] Tue, 24 April 2007 19:01
John Smith is currently offline John SmithFriend
Messages: 137
Registered: July 2009
Senior Member
Hello,


I create a TransactionalEditingDomain via:



transactionalEditingdomain = (TransactionalEditingDomainImpl)
TransactionalEditingDomain.Factory.INSTANCE.createEditingDom ain(MyResourceSet);


By that, I can rollback or commit changes I do subsequently. But after
rollback/commit, I want to delete the editing domain or at least to
detatch it from the resourceset. But I fail in that somehow. For
subsequent modifications I get following exception:


java.lang.IllegalStateException: Cannot modify resource set without a
write transaction
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ssertWriting(TransactionChangeRecorder.java:295)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.a ppendNotification(TransactionChangeRecorder.java:257)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.p rocessResourceNotification(TransactionChangeRecorder.java:22 7)
at
org.eclipse.emf.transaction.impl.TransactionChangeRecorder.n otifyChanged(TransactionChangeRecorder.java:193)
at
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify (BasicNotifierImpl.java:230)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.dispatc hNotification(NotifyingListImpl.java:260)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUniq ue(NotifyingListImpl.java:292)
at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:6 00)
...





I tried to do

transactionalEditingdomain.getResourceSet().eAdapters().clea r();

or

transactionalEditingdomain.dispose();

or

((TransactionalEditingDomainImpl.FactoryImpl)TransactionalEd itingDomain.Factory.INSTANCE).unmapResourceSet(transactional Editingdomain);


but all without success.


Any ideas would be appreciated!


Thanks
Previous Topic:[teneo] EMF 2.2.1 vs EMF 2.3.x for Teneo 0.8x
Next Topic:How to unregister a TransactionalEditingDomain?
Goto Forum:
  


Current Time: Mon Jan 25 15:23:46 GMT 2021

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

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

Back to the top