jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Tranier <john.tran...@fylab.com>
Subject Re: Jackrabbit 1.6 and DavEx ?
Date Sat, 10 Apr 2010 16:12:02 GMT
Thanks a lot Angela for these very useful information :)

John

2010/4/9 Angela Schreiber <anchela@day.com>

> hi john
>
>
>  So my question is : is it possible to have a DavEx remote connection to a
>> repository with the API 1.6 ?
>> I tried to figure out by myself by browsing the docs and the list, but I
>> couldn't find this information. I just saw the package spi2davex that gives
>> me some hope.
>>
>
> when there is such a package it should be possible.
> there are quite some issues fixed since then (-> see jira)
> but apart from that it should work.
>
>
>  If it's possible to do it, I would be glad to have a snippet of code to
>> establish the connection. I've found it for the version 2.0 but I guess the
>> Utils class used is proper to 2.0.
>>
>
> you can easily create the connection by manually creating the
> jcr2spi Repository instance. something like:
>
> String url = <your server url>;
> final RepositoryService service = createService(url) // see below;
> Repository repository = RepositoryImpl.create(new
> AbstractRepositoryConfig() {
>                    public RepositoryService getRepositoryService() {
>                        return service;
>                    }
>                });
>
> private RepositoryService createService(String uri) throws
> RepositoryException {
>        BatchReadConfig brc = new BatchReadConfig() {
>            public int getDepth(Path path, PathResolver resolver) throws
> NamespaceException {
>                return 4;
>            }
>        };
>        return new RepositoryServiceImpl(uri, brc);
>    }
>
> that code is copied from the test setup in spi2davex.
> hope that helps
> angela
>
>> Thank you !
>> John
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message