Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] : have fix fragment URI on commit
[CDO] : have fix fragment URI on commit [message #910687] Mon, 10 September 2012 08:09 Go to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi CDO Team,

We have a use case with CDO where a user create a model containment
hierarchy and a IEditorPart is opened on it. This IEditorPart is opened
with a URIEditorInput having a URI finishing with ID of temp CDOID. For
example we have :

cdo://repo1/Test/representations.aird#t4

When the user save the editor, the CDOTransaction is committed, the
CDOID of the root object change to a permanent one, then the
URIEditorInput is anymore valid. Then we must either close the editor
and reopens it to have its URIEditorInput with a correct URI or have
this IEditorPart implements IReusableEditor to do a setInput() with a
new URIEditorInput to use the permanent URI, for example :

cdo://repo1/Test/representations.aird#L16

The solution to close and reopens the editor is not very nice for the
user, and the one of implement IReusableEditor is not very efficient for
a editor opened on a big model containment hierarchy.

In local, with XMIResource we don't have this issue of URI change on
save, then we would like to have the same behaviour with CDOResource.
I understand well that permanent CDOID can only be defined by the CDO
server before than other clients request ones, but do you know a mean to
avoid this URI change on commit?

Best Regards.
Re: [CDO] : have fix fragment URI on commit [message #910729 is a reply to message #910687] Mon, 10 September 2012 09:38 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 10.09.2012 10:09, schrieb Esteban Dugueperoux:
> Hi CDO Team,
>
> We have a use case with CDO where a user create a model containment hierarchy and a IEditorPart is opened on it. This
> IEditorPart is opened with a URIEditorInput having a URI finishing with ID of temp CDOID. For example we have :
>
> cdo://repo1/Test/representations.aird#t4
>
> When the user save the editor, the CDOTransaction is committed, the CDOID of the root object change to a permanent
> one, then the URIEditorInput is anymore valid.
I see.

> Then we must either close the editor and reopens it to have its URIEditorInput with a correct URI or have this
> IEditorPart implements IReusableEditor to do a setInput() with a new URIEditorInput to use the permanent URI, for
> example :
>
> cdo://repo1/Test/representations.aird#L16
>
> The solution to close and reopens the editor is not very nice for the user,
Definitely not.

> and the one of implement IReusableEditor is not very efficient for a editor opened on a big model containment hierarchy.
Why is that?

> In local, with XMIResource we don't have this issue of URI change on save, then we would like to have the same
> behaviour with CDOResource.
> I understand well that permanent CDOID can only be defined by the CDO server before than other clients request ones,
> but do you know a mean to avoid this URI change on commit?
The only way to avoid that is to use client-assigned IDs (typically UUIDs). This must be set up before the first start
of the repository in cdo-server.xml:

<property name="idGenerationLocation" value="CLIENT"/>

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:[CDO/Hibernate/SQLServer] SQL Error: 547, SQLState: 23000
Next Topic:EMF and Model - View - Presenter - General Question
Goto Forum:
  


Current Time: Tue Apr 23 17:22:36 GMT 2024

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

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

Back to the top