Hi,

On Thu, Oct 22, 2009 at 12:32 PM, Jukka Zitting <[email protected]> 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
configuration.

BR,

Jukka Zitting

Reply via email to