jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: SPI implementation sample project using maven2?
Date Fri, 06 Feb 2009 08:01:02 GMT
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.

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

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

> 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

jackrabbit contains the following sample implementations of
the SPI interfaces:

- jackrabbit-spi2jcr (/jackrabbit/trunk/jackrabbit-spi2jcr)
- and all sub projects in

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

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.

View raw message