jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: Generic JCR repository factory
Date Thu, 22 Oct 2009 14:53:51 GMT

On Thu, Oct 22, 2009 at 12:32 PM, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> How about if we made this a part of the JcrUtils class in
> jackrabbit-jcr-commons:
>    Repository repository = JcrUtils.getRepository("http://localhost:8080/");

I've submitted a patch for this in JCR-2360. I also included a method
that simply does the Service Provider lookups:

    Map<String, String> parameters = ...; // repository settings
    Repository repository = JcrUtils.getRepository(parameters);

It might be useful to also encode the JcrUtils.getRepository(String
uri) heuristics into a GenericRepositoryFactory class that takes a
single org.apache.jackrabbit.repository.uri parameter. This way even
client code that's already written to explicitly do the
RepositoryFactory lookup can leverage the simple repository URI


Jukka Zitting

View raw message