jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: Writing a SPI Connector to an existing PostgreSQL database using JackRabbit SPI
Date Wed, 21 May 2008 14:18:59 GMT
hi pierre

> In fact what I haven't understood very well was the real JackRabbit SPI
> responsibilities. In fact the only responsibilities of the SPI are to give,
> like you say, for each data structure, an equivalent in term of node and
> properties, allowing it to be accessed through the JSR-170 API. I thought it
> has also in its responsibilities, the reading and retrieving of data from
> the persistent layer for example.

that's in fact what it is intended to do. but the means on
HOW the data are accessed is not defined and it probably depends
on the store, the data model and the available APIs.

if your store exposes multiple APIs, i would choose the
one that fits most naturally to JCR. but JCR offers a lot
of flexibility. therefore the right way to start with
depends on your needs... i'm just thinking of the nodetypes,
which may be very sophisticated or simply allow for
'unstructured' data.

> The JCR2SPI package's method then will
> enable me to instantiate my SPI implementation and I will be able to access
> it like a classical JCR repository through the API. 

yes. in order to create a jcr-Repository from the jcr2spi
project you have to pass a configuration that includes
the 'RepositoryService'. this is the key-interface of the
SPI and everything starts there. your RepositoryService
implementation would then read from your database and
define which parts define jcr-nodes, what's the nature
of their nodetype, what defines jcr-properties and what
is their type.

the user of the JCR-API is neither aware of the SPI
nor does he/she have to care about the details of
the SPI implementation.

> Do you think I am right now ?

i hope so. otherwise just write to the list.

View raw message