Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » TransactionalEditingDomain and Resource
TransactionalEditingDomain and Resource [message #895846] Mon, 16 July 2012 05:47 Go to next message
Florent Tournadre is currently offline Florent Tournadre
Messages: 1
Registered: July 2012
Junior Member
Hi,
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...)
Re: TransactionalEditingDomain and Resource [message #896071 is a reply to message #895846] Tue, 17 July 2012 03:17 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1577
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Florent,

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.

Michael
Previous Topic:Multiple Diagrams based on one model-file for the DomainModel
Next Topic:Gerrit enabled for Graphiti Git repository
Goto Forum:
  


Current Time: Thu Aug 21 18:06:45 EDT 2014

Powered by FUDForum. Page generated in 0.02833 seconds