jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: how to Connect to the Repository
Date Mon, 22 Sep 2008 09:49:01 GMT
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

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


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

View raw message