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

Francesco Mari commented on OAK-2775:
-------------------------------------

If {{Oak}} and {{Jcr}} are not supposed to be used more than once, it would be 
nice if the builder would "deactivate" itself after the first usage and throw 
{{IllegalStateException}} when factory methods are called more than once. I 
also couldn't find any reference in the Javadoc about the single-usage 
assumption.

> Oak builder changes its state during repository creation
> --------------------------------------------------------
>
>                 Key: OAK-2775
>                 URL: https://issues.apache.org/jira/browse/OAK-2775
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: oak-core
>    Affects Versions: 1.2
>            Reporter: Francesco Mari
>         Attachments: OAK-2775-01.patch
>
>
> The {{Oak#createContentRepository()}} method changes the state of the builder 
> at every invocation. In particular, it always adds a new {{CommitHook}}.
> The observable behavior is that all the {{IndexEditor}} instances are 
> executed twice when the {{Oak}} and {{Jcr}} builders are used together - i.e. 
> when both an instance of {{Repository}} and {{ContentRepository}} are needed.



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

Reply via email to