2009/7/17 Hervé Agnoux <[email protected]>: > I don't understand very well the idea of "merge". I work with the idea of the > decorator pattern. > > A myself-repository wraps the real repository, and distrib the call first to > the real, second to the distant (a mirror, or a synchro, or any other thing).
But in this case you need the remote connection available when the client writes data - in which case you always require a network connection and could just access the remote repository directly. Also it wouldn't be faster (one could say it's a slow connection, the local save is then faster), because if you wrap the JCR API used by the client, the calls would need to block until all parts (local and remote) are finished, to ensure proper behaviour. There is no way around using a merge in this situation ;-) The good thing about the merge is, that the hard part of merging is mostly implemented in Jackrabbit already and that the spec is very clear about it. > And I don't know how to do the tests. Is there some facilities to test a > repository in jackrabbit or jcr ? Assuming you want to test the JCR API, of course there are tests, as Jackrabbit is the reference implementation for the JCR spec, hence contains the whole test suite. For Jackrabbit 1.5, based on JCR 1.0: http://svn.apache.org/repos/asf/jackrabbit/branches/1.5/jackrabbit-jcr-tests/ For the upcoming Jackrabbit 2.0, with the JCR 2.0 API as basis: http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-tests/ Regards, Alex -- Alexander Klimetschek [email protected]
