First of all, forgive me for my approximated English.
I need some help using Graphiti with a centralized EMF data source persisted with TENEO or CDO.
The problem comes when I try using the same EMF object in multiple diagrams:
With CDO, an object is linked with one resource. If I create a resource for each diagram, an object used in one diagram cannot be used in another one until I put all resources in editing domain's resource set.
If I use the same resource in multiple TransactionalEditingDomain, I have following exception:
java.lang.IllegalStateException: Cannot modify resource set without a write transaction
The only solution I found is to share the same TransactionalEditingDomain in all my diagrams.
But with this method, if I save a diagram, I will also save all the others.
Is there another solution?
Thank for your reading (and hopefully response...)
Michael Wenz Messages: 1818 Registered: July 2009 Location: Walldorf, Germany
I'm not a CDO/Teneo expert, but from what you describe I would say using one
editing domain for all diagrams would be the way to go. You can change the
standard save behavior to save all resources in the domain/resource set by
overriding DefaultPersistencyBehavior.save; there you should save only the
current diagram resource and not all.