You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Sam Cruttenden <sc...@yahoo.co.uk> on 2011/05/17 16:29:38 UTC
OpenCmis JCR allow access to JCR repository instance
Hi,
I am looking to use the CMIS JCR bridge.
Is it possible to pass an already created Jackrabbit repository into the JcrServiceFactory rather than let it create one based on a config file? I ask this because our current Jackrabbit repository has our own node type definitions setup against it, which is done after the repository is created. Currently the OpenCMIS JCR bridge does not allow access to the JCR repository that it creates.
Also I have a need for testing purposes to access the Jackrabbit repository created by OpenCMIS. It would be good if my test cases could have access to it so that I can prove that our Jackrabbit repository is behaving as it should when being accessed via CMIS.
Sam
Re: OpenCmis JCR allow access to JCR repository instance
Posted by Michael Dürig <mi...@gmail.com>.
Sam,
Have a look at the class parameter in the repository.properties file of
the chemistry-opencmis-server-jcr module. That parameter specifies the
class name of a CmisServiceFactory. The default value is
org.apache.chemistry.opencmis.jcr.JcrServiceFactory. JcrServiceFactory
has a protected method acquireJcrRepository() which in the default
implementation creates a repository based on the passed parameters. You
can override this method in a custom implementation and return whatever
JCR repository you like.
Another approach is to use a remote JCR repository (i.e. via DavEx) and
configure the connection parameters in repository.properties. Have a
look at org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory for details.
Michael
On 17.5.11 16:29, Sam Cruttenden wrote:
> Hi,
>
> I am looking to use the CMIS JCR bridge.
>
>
> Is it possible to pass an already created Jackrabbit repository into
> the JcrServiceFactory rather than let it create one based on a config
> file? I ask this because our current Jackrabbit repository has our
> own node type definitions setup against it, which is done after the
> repository is created. Currently the OpenCMIS JCR bridge does not
> allow access to the JCR repository that it creates.
>
> Also I have a need for testing purposes to access the Jackrabbit
> repository created by OpenCMIS. It would be good if my test cases
> could have access to it so that I can prove that our Jackrabbit
> repository is behaving as it should when being accessed via CMIS.
>
> Sam
>