[ 
https://issues.apache.org/jira/browse/OAK-3382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14746049#comment-14746049
 ] 

Michael Dürig commented on OAK-3382:
------------------------------------

This has been addressed with OAK-2387. That issue introduced partial conflict 
handlers, which can be composed into a total conflict handler via the composite 
conflict handler. To install a partial conflict handler use 
{{Jcr.with(PartialConflictHandler)}}. This will add the passed partial conflict 
handler in front of the already installed partial conflict handler. That is, it 
will see all conflicts and can choose to handle them. Not handled conflicts are 
passed down the chain. The initial default set of installed partial conflict 
handers are those composed by {{JcrConflictHandler.createJcrConflictHandler}} 
({{JcrLastModifiedConflictHandler}}, {{ChildOrderConflictHandler}}, 
{{AnnotatingConflictHandler}}, in that order). That is, 
{{AnnotatingConflictHandler}} always has least precedence.


> Improve Registration Of ConflictHandlers
> ----------------------------------------
>
>                 Key: OAK-3382
>                 URL: https://issues.apache.org/jira/browse/OAK-3382
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.3.5
>            Reporter: Dominique Jäggi
>
> currently _ConflictHandlers_ must be added by calling 
> {code}
>   new Oak(store)
>                 ...
>                 .with(new MyConflictHandler())
>                 ...
> {code}
> if such a call takes place after the registration of the default conflict 
> handlers they will never be called for a conflict, as the default conflict 
> handlers have precedence, amongst them the _AnnotatingConflictHandler_ 
> effectively marking the conflict.
> {code}
>               ...
>             .with(JcrConflictHandler.createJcrConflictHandler())
>               ...
> {code}
> this could be tackled using a whiteboard-based ConflictHandler provider. 
> conflict handlers could be ordered by service.ranking.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to