hi kristian

reading through the jackrabbit SPI documentation[1], getting a custom SPI
implementation done seems as "easy" as just implementing two different
interfaces...

there are more than 2 interfaces :) but i'd argue that the ease of implementation mostly depends on the underlying store and whether
or not you can/want map that one smoothly to jcr items.

there are quite some simple base implementations of most of
the interfaces in the jackrabbit-spi-commons project.
see:
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-spi-commons

but then... how to throw this all into a working jackrabbit
environment?

what do you mean by 'throw this into a working jackrabbit
environment'?

How to, especially, get started this way? Is there a
straightforward, simple sample project around somewhere (preferrably maven2
based) to get one started quickly?

- the JCR API is exposed by the impl present in jackrabbit-jcr2spi.
- you have to provide the RepositoryConfiguration that exposes
  your spi-RepositoryService implementation.
- an entry point to the JCR API would then be a RepositoryFactory.
  you may find an example in
  http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi/client

jackrabbit contains the following sample implementations of
the SPI interfaces:

- jackrabbit-spi2jcr (/jackrabbit/trunk/jackrabbit-spi2jcr)
- and all sub projects in
  http://svn.apache.org/repos/asf/jackrabbit/sandbox/spi

all of those are maven2 projects as far as i know.

in order to test you impl you can run test on the JCR API or
on the SPI.

JCR testing:

- test-suite provided by jackrabbit-jcr-test
- additinal tests provided with jcr2spi (as a separate
  jackrabbit-jcr2spi-tests.jar)

SPI testing:

- currently no complete covery with tests yet (work in progress)
- but there are a couple of tests present with the SPI
  (again separate tests.jar that you may add a dependency to in
   your pom)

hope that helps.
angela

Reply via email to