You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by ippon <ch...@tomcat.de> on 2014/08/21 16:05:18 UTC

How to access a standalone Oak Server from a webapp?

Hello!

Another (assumably quite stupid) question:
How can I get a connection to a standalone Oak repository from a webapp?

I tried to retrieve a javax.jcr.Repository via "(new
OakRepositoryFactory()).getRepository(parameters)", passing in the URI of
the started Oak repository using the key
"org.apache.jackrabbit.repository.uri"; the problem is just that the
OakRepositoryFactory simply ignores this URI an returns only a "default
repository" within RAM by calling "new Jcr().createRepository()"... :-/

I couldn't find any other(?) way how to access a remote Oak repository, so a
short hint (or - even better - an example) would be very helpful!

Thanks in advance,
Christian



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/How-to-access-a-standalone-Oak-Server-from-a-webapp-tp4661269.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: How to access a standalone Oak Server from a webapp?

Posted by Chetan Mehrotra <ch...@gmail.com>.
Hi Christian,

Currently Oak does not have feature parity with Jackrabbit wrt usecase
where embedding is required. You have couple of options

1. Construct the Oak Jcr as being done in various testcases or documented at [1]
2. Use the oak-pojosr module [2] - It makes use of inbuilt OSGi
support and some Felix bundles to construct repository in a non OSGi
env.

As of now #2 works fine and we use it for couple of integration test
cases also. Just that it involves packaging of some extra jars

Chetan Mehrotra
[1] http://jackrabbit.apache.org/oak/docs/construct.html
[2] https://github.com/apache/jackrabbit-oak/tree/trunk/oak-pojosr


On Fri, Aug 22, 2014 at 2:58 PM, ippon <ch...@tomcat.de> wrote:
> Thanks for the clarification
> - I was affraid it would be like this... :-/
>
> But then I may ask:
> what /is/ the intended usage model for Oak if we have to access the
> repository out of a JEE application?
>
> As far as I could see, there is nothing like the JCA adaptor which could be
> found for Jackrabbit 2.x, e.g.!?
>
>
>
> --
> View this message in context: http://jackrabbit.510166.n4.nabble.com/How-to-access-a-standalone-Oak-Server-from-a-webapp-tp4661269p4661276.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: How to access a standalone Oak Server from a webapp?

Posted by ippon <ch...@tomcat.de>.
Thanks for the clarification 
- I was affraid it would be like this... :-/

But then I may ask:
what /is/ the intended usage model for Oak if we have to access the
repository out of a JEE application? 

As far as I could see, there is nothing like the JCA adaptor which could be
found for Jackrabbit 2.x, e.g.!?



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/How-to-access-a-standalone-Oak-Server-from-a-webapp-tp4661269p4661276.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: How to access a standalone Oak Server from a webapp?

Posted by Davide Giannella <da...@apache.org>.
On 21/08/2014 15:05, ippon wrote:
> Hello!
>
> Another (assumably quite stupid) question:
> How can I get a connection to a standalone Oak repository from a webapp?
> ...
IIRC it's not currently possible. There was an effort in oak-http but I
think it got abandoned in favour of using Sling+Oak and then using the
Sling's REST API for interacting with the repository.

Don't know about the status of Sling and Oak integration.

Regards
Davide