jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Repository Creation questions
Date Thu, 26 Nov 2009 00:14:48 GMT
On Wed, Nov 25, 2009 at 22:45, ChadDavis <chadmichaeldavis@gmail.com> wrote:
> I'm looking at the standalone server code and I see that the creation
> of the underlying repository does not use the factory pattern.  It
> instead uses the create method of the RepositoryImpl class itselt.
> Here's the code:
>           repository = RepositoryImpl.create(RepositoryConfig.create(
>                    config.toURI(), home.getPath()));
> Then, looking at the RepositoryFactoryImpl code, I see that it really
> makes little difference.  Which leaves me a bit confused as to why one
> would use the factory.  I suppose it's because it's more flexible, but
> I'm unable to wrap my head around what that might mean, at this point.

JCR 2.0 spec defines the javax.jcr.RepositoryFactory interface as a
standardized way to acquire a repository, passing a map of parameters
only. See http://www.day.com/specs/jcr/2.0/4_Connecting.html

> So . . . if I'm going to create my own repository, what method is recommended?

As long as you are not using JCR 2.0, just use the RepositoryImpl
directly if the TransientRepository doesn't work out for you. It's
easy to change later anyway.


Alexander Klimetschek

View raw message