[
https://issues.apache.org/jira/browse/OAK-2760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14493577#comment-14493577
]
Chetan Mehrotra commented on OAK-2760:
--------------------------------------
Not sure on the best way to allow access to ContentRepository created within
Jcr class. One way would be to cache the ContentRepository instance within Jcr
and reuse that
[~mduerig] Thoughts?
> 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)