Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Resolve single CDOObject in state CONFLICT
[CDO] Resolve single CDOObject in state CONFLICT [message #425601] Wed, 03 December 2008 08:35 Go to next message
Bjoern Sundin is currently offline Bjoern SundinFriend
Messages: 47
Registered: July 2009
Member
In my current application I have a CDO conform EMF model and a custom RCP
ViewPart (no edit or editor plugins). I'm using CDO 2.0 (I200811270213).

Probably I've overseen the obvious, but I haven't found a clean way to
resolve when a dirty CDOObject in one client is in the conflict state.

I have the following use case:
a) Two clients have made modifications on the same CDOObject.
b) Client A saves (transaction.commit()).
c) Client B gets notified by a CDOSessionInvalidationEvent and indicates in
its viewer that the object now has a conflict (red, bold font).
d) The user of client B selects the conflicting object in the viewer and
invokes a resolve conflict action from the context menu.
e) The resolve conflict action updates the selected CDOObject with the state
CONFLICT.

The problem I haven't found a solution to yet is in e) above. How do I
retrieve the latest, valid version of the CDOObject from the server and get
the CDOView to accept that this CDOObject no longer is in the state
CONFLICT? All ways I've found to reload or read a CDOObject in CONFLICT
state are ignored by the FiniteStateMachine. I would rather not want to
reload the whole CDOView in order to resolve.

Your input would be much appreciated!
Bjoern
Re: [CDO] Resolve single CDOObject in state CONFLICT [message #425612 is a reply to message #425601] Wed, 03 December 2008 12:42 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Hi Bjoern,

I agree with you that we could provide more tools for the resolve conflict.

It is almost impossible to rollback only one object since it could lead
to an invalid graph state :-(.

Probably this feature will help you...
256492: Automatically and locally merge non-conflicting remote changes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=256492

Could you open a bugzilla to be able to handle conflict object without
rollback the view completely...We will be able to discuss there our
possibility.

Simon



Bjoern Sundin wrote:
> In my current application I have a CDO conform EMF model and a custom RCP
> ViewPart (no edit or editor plugins). I'm using CDO 2.0 (I200811270213).
>
> Probably I've overseen the obvious, but I haven't found a clean way to
> resolve when a dirty CDOObject in one client is in the conflict state.
>
> I have the following use case:
> a) Two clients have made modifications on the same CDOObject.
> b) Client A saves (transaction.commit()).
> c) Client B gets notified by a CDOSessionInvalidationEvent and indicates in
> its viewer that the object now has a conflict (red, bold font).
> d) The user of client B selects the conflicting object in the viewer and
> invokes a resolve conflict action from the context menu.
> e) The resolve conflict action updates the selected CDOObject with the state
> CONFLICT.
>
> The problem I haven't found a solution to yet is in e) above. How do I
> retrieve the latest, valid version of the CDOObject from the server and get
> the CDOView to accept that this CDOObject no longer is in the state
> CONFLICT? All ways I've found to reload or read a CDOObject in CONFLICT
> state are ignored by the FiniteStateMachine. I would rather not want to
> reload the whole CDOView in order to resolve.
>
> Your input would be much appreciated!
> Bjoern
>
>
Re: [CDO] Resolve single CDOObject in state CONFLICT [message #425623 is a reply to message #425601] Wed, 03 December 2008 13:50 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
One solution that could work is the following:

- A feature that will rollback and re-apply the changes you made based
on the latest version of objects. (e.g.: view.reapplyAllChanges());

You could still have issue there.. but in some cases could work.

Simon

Bjoern Sundin wrote:
> In my current application I have a CDO conform EMF model and a custom RCP
> ViewPart (no edit or editor plugins). I'm using CDO 2.0 (I200811270213).
>
> Probably I've overseen the obvious, but I haven't found a clean way to
> resolve when a dirty CDOObject in one client is in the conflict state.
>
> I have the following use case:
> a) Two clients have made modifications on the same CDOObject.
> b) Client A saves (transaction.commit()).
> c) Client B gets notified by a CDOSessionInvalidationEvent and indicates in
> its viewer that the object now has a conflict (red, bold font).
> d) The user of client B selects the conflicting object in the viewer and
> invokes a resolve conflict action from the context menu.
> e) The resolve conflict action updates the selected CDOObject with the state
> CONFLICT.
>
> The problem I haven't found a solution to yet is in e) above. How do I
> retrieve the latest, valid version of the CDOObject from the server and get
> the CDOView to accept that this CDOObject no longer is in the state
> CONFLICT? All ways I've found to reload or read a CDOObject in CONFLICT
> state are ignored by the FiniteStateMachine. I would rather not want to
> reload the whole CDOView in order to resolve.
>
> Your input would be much appreciated!
> Bjoern
>
>
Re: [CDO] Resolve single CDOObject in state CONFLICT [message #425628 is a reply to message #425612] Wed, 03 December 2008 14:16 Go to previous messageGo to next message
Bjoern Sundin is currently offline Bjoern SundinFriend
Messages: 47
Registered: July 2009
Member
Hi Simon,

Yes, I guess that bug 256492 would resolve part of such a problem (in the
case of new objects to be merged). For my use case though, I opened bug
257372 for this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=257372

Cheers
Bjoern


"Simon McDuff" <smcduff@hotmail.com> schrieb im Newsbeitrag
news:gh5us8$2oe$1@build.eclipse.org...
> Hi Bjoern,
>
> I agree with you that we could provide more tools for the resolve
> conflict.
>
> It is almost impossible to rollback only one object since it could lead to
> an invalid graph state :-(.
>
> Probably this feature will help you...
> 256492: Automatically and locally merge non-conflicting remote changes
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=256492
>
> Could you open a bugzilla to be able to handle conflict object without
> rollback the view completely...We will be able to discuss there our
> possibility.
>
> Simon
>
>
>
> Bjoern Sundin wrote:
>> In my current application I have a CDO conform EMF model and a custom RCP
>> ViewPart (no edit or editor plugins). I'm using CDO 2.0 (I200811270213).
>>
>> Probably I've overseen the obvious, but I haven't found a clean way to
>> resolve when a dirty CDOObject in one client is in the conflict state.
>>
>> I have the following use case:
>> a) Two clients have made modifications on the same CDOObject.
>> b) Client A saves (transaction.commit()).
>> c) Client B gets notified by a CDOSessionInvalidationEvent and indicates
>> in its viewer that the object now has a conflict (red, bold font).
>> d) The user of client B selects the conflicting object in the viewer and
>> invokes a resolve conflict action from the context menu.
>> e) The resolve conflict action updates the selected CDOObject with the
>> state CONFLICT.
>>
>> The problem I haven't found a solution to yet is in e) above. How do I
>> retrieve the latest, valid version of the CDOObject from the server and
>> get the CDOView to accept that this CDOObject no longer is in the state
>> CONFLICT? All ways I've found to reload or read a CDOObject in CONFLICT
>> state are ignored by the FiniteStateMachine. I would rather not want to
>> reload the whole CDOView in order to resolve.
>>
>> Your input would be much appreciated!
>> Bjoern
Re: [CDO] Resolve single CDOObject in state CONFLICT [message #425629 is a reply to message #425623] Wed, 03 December 2008 14:27 Go to previous messageGo to next message
Bjoern Sundin is currently offline Bjoern SundinFriend
Messages: 47
Registered: July 2009
Member
Exactly! Though, for me I would rather see it as
view.rollbackAndUpdate(object): rollback local changes and retrieve latest
version.

Bjoern

"Simon McDuff" <smcduff@hotmail.com> schrieb im Newsbeitrag
news:gh62qp$pi1$1@build.eclipse.org...
> One solution that could work is the following:
>
> - A feature that will rollback and re-apply the changes you made based on
> the latest version of objects. (e.g.: view.reapplyAllChanges());
>
> You could still have issue there.. but in some cases could work.
>
> Simon
>
> Bjoern Sundin wrote:
>> In my current application I have a CDO conform EMF model and a custom RCP
>> ViewPart (no edit or editor plugins). I'm using CDO 2.0 (I200811270213).
>>
>> Probably I've overseen the obvious, but I haven't found a clean way to
>> resolve when a dirty CDOObject in one client is in the conflict state.
>>
>> I have the following use case:
>> a) Two clients have made modifications on the same CDOObject.
>> b) Client A saves (transaction.commit()).
>> c) Client B gets notified by a CDOSessionInvalidationEvent and indicates
>> in its viewer that the object now has a conflict (red, bold font).
>> d) The user of client B selects the conflicting object in the viewer and
>> invokes a resolve conflict action from the context menu.
>> e) The resolve conflict action updates the selected CDOObject with the
>> state CONFLICT.
>>
>> The problem I haven't found a solution to yet is in e) above. How do I
>> retrieve the latest, valid version of the CDOObject from the server and
>> get the CDOView to accept that this CDOObject no longer is in the state
>> CONFLICT? All ways I've found to reload or read a CDOObject in CONFLICT
>> state are ignored by the FiniteStateMachine. I would rather not want to
>> reload the whole CDOView in order to resolve.
>>
>> Your input would be much appreciated!
>> Bjoern
Re: [CDO] Resolve single CDOObject in state CONFLICT [message #425633 is a reply to message #425629] Wed, 03 December 2008 14:44 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
I'm not good in name!

Bjoern Sundin wrote:
> Exactly! Though, for me I would rather see it as
> view.rollbackAndUpdate(object): rollback local changes and retrieve latest
> version.
>
> Bjoern
>
> "Simon McDuff" <smcduff@hotmail.com> schrieb im Newsbeitrag
> news:gh62qp$pi1$1@build.eclipse.org...
>> One solution that could work is the following:
>>
>> - A feature that will rollback and re-apply the changes you made based on
>> the latest version of objects. (e.g.: view.reapplyAllChanges());
>>
>> You could still have issue there.. but in some cases could work.
>>
>> Simon
>>
>> Bjoern Sundin wrote:
>>> In my current application I have a CDO conform EMF model and a custom RCP
>>> ViewPart (no edit or editor plugins). I'm using CDO 2.0 (I200811270213).
>>>
>>> Probably I've overseen the obvious, but I haven't found a clean way to
>>> resolve when a dirty CDOObject in one client is in the conflict state.
>>>
>>> I have the following use case:
>>> a) Two clients have made modifications on the same CDOObject.
>>> b) Client A saves (transaction.commit()).
>>> c) Client B gets notified by a CDOSessionInvalidationEvent and indicates
>>> in its viewer that the object now has a conflict (red, bold font).
>>> d) The user of client B selects the conflicting object in the viewer and
>>> invokes a resolve conflict action from the context menu.
>>> e) The resolve conflict action updates the selected CDOObject with the
>>> state CONFLICT.
>>>
>>> The problem I haven't found a solution to yet is in e) above. How do I
>>> retrieve the latest, valid version of the CDOObject from the server and
>>> get the CDOView to accept that this CDOObject no longer is in the state
>>> CONFLICT? All ways I've found to reload or read a CDOObject in CONFLICT
>>> state are ignored by the FiniteStateMachine. I would rather not want to
>>> reload the whole CDOView in order to resolve.
>>>
>>> Your input would be much appreciated!
>>> Bjoern
>
>
Re: [CDO] Resolve single CDOObject in state CONFLICT [message #425652 is a reply to message #425623] Wed, 03 December 2008 18:42 Go to previous messageGo to next message
Tom Crockett is currently offline Tom CrockettFriend
Messages: 54
Registered: July 2009
Member
This would be fantastic!

Simon McDuff wrote:

> One solution that could work is the following:

> - A feature that will rollback and re-apply the changes you made based
> on the latest version of objects. (e.g.: view.reapplyAllChanges());

> You could still have issue there.. but in some cases could work.

> Simon

> Bjoern Sundin wrote:
>> In my current application I have a CDO conform EMF model and a custom RCP
>> ViewPart (no edit or editor plugins). I'm using CDO 2.0 (I200811270213).
>>
>> Probably I've overseen the obvious, but I haven't found a clean way to
>> resolve when a dirty CDOObject in one client is in the conflict state.
>>
>> I have the following use case:
>> a) Two clients have made modifications on the same CDOObject.
>> b) Client A saves (transaction.commit()).
>> c) Client B gets notified by a CDOSessionInvalidationEvent and indicates in
>> its viewer that the object now has a conflict (red, bold font).
>> d) The user of client B selects the conflicting object in the viewer and
>> invokes a resolve conflict action from the context menu.
>> e) The resolve conflict action updates the selected CDOObject with the
state
>> CONFLICT.
>>
>> The problem I haven't found a solution to yet is in e) above. How do I
>> retrieve the latest, valid version of the CDOObject from the server and get
>> the CDOView to accept that this CDOObject no longer is in the state
>> CONFLICT? All ways I've found to reload or read a CDOObject in CONFLICT
>> state are ignored by the FiniteStateMachine. I would rather not want to
>> reload the whole CDOView in order to resolve.
>>
>> Your input would be much appreciated!
>> Bjoern
>>
>>
Re: [CDO] Resolve single CDOObject in state CONFLICT [message #425671 is a reply to message #425623] Thu, 04 December 2008 14:02 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6476
Registered: July 2009
Senior Member
Simon,

Good idea!

That reminds me that I often thought we should have an umbrella concept
for all the possible new, deleted and delta instances. Something like
CDODeltaDescription...

Many signatures could become simpler this way.

Cheers
/Eike

----
http://thegordian.blogspot.com



Simon McDuff schrieb:
> One solution that could work is the following:
>
> - A feature that will rollback and re-apply the changes you made based
> on the latest version of objects. (e.g.: view.reapplyAllChanges());
>
> You could still have issue there.. but in some cases could work.
>
> Simon
>
> Bjoern Sundin wrote:
>> In my current application I have a CDO conform EMF model and a custom
>> RCP ViewPart (no edit or editor plugins). I'm using CDO 2.0
>> (I200811270213).
>>
>> Probably I've overseen the obvious, but I haven't found a clean way
>> to resolve when a dirty CDOObject in one client is in the conflict
>> state.
>>
>> I have the following use case:
>> a) Two clients have made modifications on the same CDOObject.
>> b) Client A saves (transaction.commit()).
>> c) Client B gets notified by a CDOSessionInvalidationEvent and
>> indicates in its viewer that the object now has a conflict (red, bold
>> font).
>> d) The user of client B selects the conflicting object in the viewer
>> and invokes a resolve conflict action from the context menu.
>> e) The resolve conflict action updates the selected CDOObject with
>> the state CONFLICT.
>>
>> The problem I haven't found a solution to yet is in e) above. How do
>> I retrieve the latest, valid version of the CDOObject from the server
>> and get the CDOView to accept that this CDOObject no longer is in the
>> state CONFLICT? All ways I've found to reload or read a CDOObject in
>> CONFLICT state are ignored by the FiniteStateMachine. I would rather
>> not want to reload the whole CDOView in order to resolve.
>>
>> Your input would be much appreciated!
>> Bjoern
>>


Previous Topic:[CDO / Net4J]Null Pointer Exception
Next Topic:[CDO] Welcome Victor Roldan Betancort as new committer
Goto Forum:
  


Current Time: Mon Feb 17 22:03:29 GMT 2020

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

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

Back to the top