From users-return-7506-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Wed May 21 14:17:52 2008 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 207 invoked from network); 21 May 2008 14:17:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 May 2008 14:17:52 -0000 Received: (qmail 52476 invoked by uid 500); 21 May 2008 14:17:52 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 52353 invoked by uid 500); 21 May 2008 14:17:52 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 52341 invoked by uid 99); 21 May 2008 14:17:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2008 07:17:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anchela@day.com designates 62.192.10.254 as permitted sender) Received: from [62.192.10.254] (HELO goobak01.day.com) (62.192.10.254) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2008 14:17:05 +0000 Received: by goobak01.day.com (Postfix, from userid 1212) id 19B4B50871; Wed, 21 May 2008 16:15:50 +0200 (CEST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by goobak01.day.com (Postfix) with ESMTP id AB1765086A for ; Wed, 21 May 2008 16:15:49 +0200 (CEST) Received: by py-out-1112.google.com with SMTP id f47so2376346pye.8 for ; Wed, 21 May 2008 07:17:17 -0700 (PDT) Received: by 10.35.20.20 with SMTP id x20mr457964pyi.38.1211379437244; Wed, 21 May 2008 07:17:17 -0700 (PDT) Received: from ?10.0.0.108? ( [62.192.10.254]) by mx.google.com with ESMTPS id p57sm365246pyb.27.2008.05.21.07.17.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 May 2008 07:17:16 -0700 (PDT) Message-ID: <48342F53.4000708@day.com> Date: Wed, 21 May 2008 16:18:59 +0200 From: Angela Schreiber User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Writing a SPI Connector to an existing PostgreSQL database using JackRabbit SPI References: <4833CA10.3000504@day.com> <4833FC28.60806@day.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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. angela