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 <[EMAIL PROTECTED]> 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 > [EMAIL PROTECTED] > > -- 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.
