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

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

An alternative would be to add a {{clone}} method to {{Oak}} for obtaining 
pristine Oak builder instance.

> HttpServer in Oak creates multiple instance of ContentRepository
> ----------------------------------------------------------------
>
>                 Key: OAK-2760
>                 URL: https://issues.apache.org/jira/browse/OAK-2760
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: run
>            Reporter: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.3.0
>
>
> Http Server in oak-run constructs multiple repository instance of 
> ContentRepository [1]
> {code}
> Jcr jcr = new Jcr(oak);
>             // 1 - OakServer
>             ContentRepository repository = oak.createContentRepository();
>             ServletHolder holder = new ServletHolder(new 
> OakServlet(repository));
>             context.addServlet(holder, path + "/*");
>             // 2 - Webdav Server on JCR repository
>             final Repository jcrRepository = jcr.createRepository();
> {code}
> In above code a repository instance is created twice via same Oak instance 1 
> in OakServer and 2 for webdav. 
> [1] 
> https://github.com/apache/jackrabbit-oak/blob/trunk/oak-run/src/main/java/org/apache/jackrabbit/oak/run/Main.java#L1125-1133



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

Reply via email to