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 "Mike Nimer (JIRA)" <ji...@apache.org> on 2015/04/17 18:36:59 UTC

[jira] [Created] (OAK-2786) Add a way to to get the OAK ContentRepository from the JCR Repository

Mike Nimer created OAK-2786:
-------------------------------

             Summary: Add a way to to get the OAK ContentRepository from the JCR Repository
                 Key: OAK-2786
                 URL: https://issues.apache.org/jira/browse/OAK-2786
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.2
            Reporter: Mike Nimer


Add a getOakContentRepository() method to the JCR Repository class, or something similar, after you have initialized the JCR Repository. 

I've decided to use the JCR Repository instead of the OAK Content Repository API's (for things like User Manager). However, since I'm not using OSGI this seems to be one of those either or decisions. Pick one repository and code everything against that.  However, I still need to get access to the Oak Content Repository at times, for instance to get a Root object for the Security classes.

Based on an email conversation with Chetan Mehrotra this appears to be related to #OAK-2760 and his idea was:
-----
I am seeing similar requirement for that at OAK-2760 where the
HttpServer has to access both ContentRepository and JCR Repository.
Should we modify the Jcr class to

1. To not allow more than 1 invocation for createRepository
2. Cache the repo created in createRepository
3. Expose a getter for the ContentRepository instance created in
createRepository

OR
1. Have special interface for providing ContentRepository via
RepositoryImpl. Something like RepositoryImpl implements OakRepository
and have it provide accessor for the backing content repo instance




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