jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <ju...@zitting.name>
Subject Re: FW: JCR, RMI & WebDAV - draft HOWTO
Date Wed, 07 Dec 2005 15:09:21 GMT

Peter Darton wrote:
> Footnotes (aka Whinge list):
> As a result of going through all of this, I'm left with a number of
> questions/wishes.  (i.e. this is a list of complaints that things
> weren't as I expected - please don't take it personally)

Very good points! While there are good counterpoints to part of the 
issues you raised (Maven use, etc.), I think many of us who are quite 
accustomed to using Maven, JCR, and Jackrabbit don't even notice the 
problems and questions that look like major issues to newcomers.

> Q1) Why on earth wasn't JCR designed with remote access in mind?
 > [...]
> In the case of the RMI-JCR code, one gets arrays where one would expect
> Iterators, and getting data in and out of the RMI-JCR is not nearly as
> friendly as with the "raw" JCR code itself.

You must be using the RMI interfaces directly! Take a look at the 
org.apache.jackrabbit.rmi.client package that wraps the raw RMI 
interfaces into JCR-compliant adapters. The minimum survival sequence is:

     String name = ...; // The RMI URL of the repository
     ClientRepositoryFactory factory = new ClientRepositoryFactory();
     Repository repository = factory.getRepository(name);

After that you will be able to use the remote repository throught the 
normal JCR API. :-) See the o.a.j.rmi.client package javadocs for more 


Jukka Zitting

View raw message