You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2015/04/14 07:09:12 UTC
[jira] [Created] (OAK-2760) HttpServer in Oak creates multiple
instance of ContentRepository
Chetan Mehrotra created OAK-2760:
------------------------------------
Summary: 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)