Hi, Thanks to the information provided by Angela I've been able to connect my application to a repository through WebDAV (using the jackrabbit-webapp).
Unfortunately, many of my integration tests are not passing anymore. After some investigations, I could figure out these 2 issues : 1) DavEx requires the session to be saved more frequently to avoid exception on type constraints (in particular, I have a mixin type that inherits from another - When I need to add both types to a node, a session.save() in between is necessary). 2) session.move doesn't seem to be handled properly : after a move, any operation on the moved node within the current session leads to a PathNotFoundException (with the old path). I wonder if those are known issues? And if there is a solution? Maybe it is different in version 2.0.0 (I'm using 1.6.0). I saw on jira the issue JCR-2540 that says : "all TCK tests including move or reorder fail in the setup jcr2spi - spi2dav(ex) - jcr-server." It could be my problem. Best regards, John 2010/4/10 John Tranier <[email protected]> > Thanks a lot Angela for these very useful information :) > > John > > 2010/4/9 Angela Schreiber <[email protected]> > > 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 >>> >>> >> >
