jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xing007008 <xing007...@163.com>
Subject Re: how to Connect to the Repository
Date Mon, 22 Sep 2008 09:59:47 GMT

Thank you for your replay.
But I don't want to use jackrabbit. I want to just use jsr170
api(jcr-1.0.jar).
How about the demo which just using jcr-1.0.jar?




Alexander Klimetschek wrote:
> 
> There are many ways, depending on the context ;-) But there is not
> JSR170 way (you cite that it is "outside the spec").
> 
> To create a standalone Jackrabbit repository, use new
> TransientRepository(), see
> http://jackrabbit.apache.org/first-hops.html
> 
> In all other use-cases, the repository is created by some server
> instance (eg. the jackrabbit webapp package or a J2EE container, using
> a resource configuration) that makes the repository available through
> JNDI or RMI. The snippet from your mail is the client part of the JNDI
> case. See also
> http://jackrabbit.apache.org/jcr-client-application-howto.html
> 
> Regards,
> Alex
> 
> PS: Please post such questions (JCR API, Jackrabbit usage, etc) to the
> users list, the dev list is used for Jackrabbit development.
> 
> On Mon, Sep 22, 2008 at 11:33 AM, xing007008 <xing007008@163.com> wrote:
>>
>> Connect to the Repository
>> Acquire the Repository object: exact mechanism is outside
>> spec, but one possible way: JNDI
>> // Get the Repository object
>> InitialContext ctx =
>> Repository repository =
>> (Repository)ctx.lookup("MyRepository");
>>
>>
>> I don't know how to get the Repository just use jsp170 api.
>>
>> Who can help me?
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-Connect-to-the-Repository-tp19604544p19604544.html
>> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-Connect-to-the-Repository-tp19604544p19604896.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Mime
View raw message