|
Re: [CDO] Resolving merge conflicts [message #1692985 is a reply to message #1692869] |
Tue, 21 April 2015 05:48 |
|
Am 20.04.2015 um 12:32 schrieb Alexander Klatt:
> Hi,
>
> I would like to commit changes to the same object A.
>
> One thread changes A.x
> and the other changes A.y
>
> Even though, that these changes do not overlap,
They do overlap because they change the same object A.
> I get a commit exception. This is the expected behavior, right?
Yes.
> Until now, I had the strategy to rollback my transaction, reapply the changes and recommit in case of a conflict.
That is a valid strategy to resolve conflicts.
> This does not seem very nice to me and after some research I found the following
> code which seems to work for me:
>
> transaction.options().addConflictResolver(new CDOMergingConflictResolver());
Yes, that should work.
> The documentation is not very clear on this topic, and the eclipse help says that
> CDOMergingConflictResolver is deprecated.
Can you paste a link? Never trust the documentation. The code is clear: CDOMergingConflictResolver is *not* deprecated.
> Could you give me some advice on how I should handle merge conflicts?
I'll soon start to implement a completely new mechanism to resolving conflicts, but for now CDOMergingConflictResolveris
the right approach.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03296 seconds