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 09:47 Go to next message
Florent Tournadre is currently offline Florent TournadreFriend
Messages: 1
Registered: July 2012
Junior Member
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 07:17 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1751
Registered: July 2009
Location: Walldorf, Germany
Senior Member

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; there you should save only the
current diagram resource and not all.

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

Current Time: Wed Dec 02 01:42:00 GMT 2015

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

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