Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E50B2959A for ; Thu, 19 Apr 2012 20:54:17 +0000 (UTC) Received: (qmail 23591 invoked by uid 500); 19 Apr 2012 20:54:17 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 23564 invoked by uid 500); 19 Apr 2012 20:54:17 -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 23556 invoked by uid 99); 19 Apr 2012 20:54:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2012 20:54:17 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.18.1.23] (HELO exprod6og109.obsmtp.com) (64.18.1.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2012 20:54:08 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob109.postini.com ([64.18.5.12]) with SMTP ID DSNKT5B7W8ZK8vBzKad9BfmClGEcKKUq60vX@postini.com; Thu, 19 Apr 2012 13:53:47 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q3JKpcJ0004526 for ; Thu, 19 Apr 2012 13:51:38 -0700 (PDT) Received: from nahub01.corp.adobe.com (nahub01.corp.adobe.com [10.8.189.97]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id q3JKrkvm007942 for ; Thu, 19 Apr 2012 13:53:46 -0700 (PDT) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nahub01.corp.adobe.com (10.8.189.97) with Microsoft SMTP Server (TLS) id 8.3.192.1; Thu, 19 Apr 2012 13:53:46 -0700 Received: from susi.local (10.136.135.76) by eurhub01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.192.1; Thu, 19 Apr 2012 21:53:44 +0100 Message-ID: <4F907B58.6020506@apache.org> Date: Thu, 19 Apr 2012 21:53:44 +0100 From: =?ISO-8859-1?Q?Michael_D=FCrig?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Subject: Re: Problem retrieving NodeId (SPI) References: <4F901EAA.2050706@gmx.de> <1A50D880-5BED-49CB-8666-8FC0F6E18658@altiuz.cl> <4F905489.2070902@apache.org> <57910F77-25E8-4DC1-A76F-1A77681EC26B@altiuz.cl> In-Reply-To: <57910F77-25E8-4DC1-A76F-1A77681EC26B@altiuz.cl> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 8bit I see. The SPI won't help here. You'd implement the SPI for providing your own JCR implementation backed by a 3rd party storage mechanism. Michael On 19.4.12 20:24, Gonzalo Vasquez wrote: > I'm trying to batch load thousands of documents in batch mode, as in > single doc mode takes too long. I guess the SPI would come handy this way. > > Do I have to implement the interface? There's no such implementation > provided in any of the jackrabbit distribution jar files? > > Can someone please provide sample code for batch importing documents > (nodes with file attachments)? > > Regards, > > *Gonzalo V�squez S�ez* > *Gerente Investigaci�n y Desarrollo (R&D)* > *Altiuz*Soluciones Tecnol�gicas de Negocios Ltda. > Av. Nueva Tajamar 555 Of. 802, Las Condes > (56-2) 335 2461 > _gvasquez@altiuz.c l_ > ___http://www.altiuz.cl _ > > > El 19-04-2012, a las 15:08, Michael D�rig escribi�: > >> >> >> On 19.4.12 17:34, Gonzalo Vasquez wrote: >>> Understood! "All over the place" seems to be the key, but under that >>> conditions how do I retrieve the root NodeId? I guess using the the >>> RepositoryService might help, but the only method I can think of is the >>> executeQuery, isn't there an equivalent for Session.getRootNode() from >>> javax.jcr? I need to traverse a tree of nodes prior to the batch insert >>> process. >> >> Hi, >> >> What are you trying to achieve here? If you implement the SPI, you >> basically have to implement the RepositoryService interface. In that >> casse you don't get the root NodeId from anywhere, but you rather have >> to supply it yourself. See PathFactory and IdFactory. >> >> Michael >> >>> >>> Any SPI code tutorials available? >>> >>> *Gonzalo V�squez S�ez* >>> *Gerente Investigaci�n y Desarrollo (R&D)* >>> *Altiuz*Soluciones Tecnol�gicas de Negocios Ltda. >>> Av. Nueva Tajamar 555 Of. 802, Las Condes >>> (56-2) 335 2461 >>> _gvasquez@altiuz.c l_ >>> ___http://www.altiuz.cl _ >>> >>> >>> El 19-04-2012, a las 11:18, Julian Reschke escribi�: >>> >>>> On 2012-04-18 16:53, Gonzalo Vasquez wrote: >>>>> I'm trying to use the org.apache.jackrabbit.spi.Batch class methods >>>>> provided by the SPI package (jackrabbit-spi-2.4.1.jar), but I'm having >>>>> trouble discovering how to get the NodeId param as the one it needs is >>>>> from the spi package, not from the core one. Some Helper / Factory >>>>> class >>>>> perhaps? >>>>> >>>>> Any ideas would be appreciated! >>>>> >>>>> Regards, >>>>> ... >>>> >>>> The Batch class is needed to implement write operations in an SPI >>>> implementation. In which case, you should be using spi.NodeIds all >>>> over the place... >>>> >>>> Can you clarify what you're trying to do? >>>> >>>> Best regards, Julian >>> >