Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 21317 invoked from network); 7 Jul 2009 11:23:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jul 2009 11:23:51 -0000 Received: (qmail 84895 invoked by uid 500); 7 Jul 2009 11:24:01 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 84872 invoked by uid 500); 7 Jul 2009 11:24:01 -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 84861 invoked by uid 99); 7 Jul 2009 11:24:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 11:24:01 +0000 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 bdelacretaz@gmail.com designates 72.14.220.153 as permitted sender) Received: from [72.14.220.153] (HELO fg-out-1718.google.com) (72.14.220.153) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 11:23:52 +0000 Received: by fg-out-1718.google.com with SMTP id l26so1440565fgb.20 for ; Tue, 07 Jul 2009 04:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=G0+uojip8Esd+GFcNgZIueYDcrn2V5CJORpKjeoSI3E=; b=uVKNPHdDPuyIxjUOq/2X/HfIMQNCJVgofaXUnQXXTXKsVmT2tF60NCM3Fk30/ciMdh 50NP+gZZhOARvFe2zV4NUjeRwdxNG+1REG8B5nRdwGfjeRQQ+B2YAUv/XKJNjYCEStrx Og3uYBTZJYeB9Mhm6FhzGOdn5jEUQEArxoTKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=qP7pIaXqNADGB4jMaYaHJhZ012YlYxCiP1uP4nT2cb13YHcKq9+hU9hKXfMt69VA0m uAchssiIdLynq1i/O059fVCzdYJyqxpuD9VixcDRriicVuRer+I86j8GTQcn/hybkoZE cThVrVlBnf1TJFcoTJBolA+0HpjdXOyFWJ5vc= MIME-Version: 1.0 Sender: bdelacretaz@gmail.com Received: by 10.86.53.11 with SMTP id b11mr2310835fga.12.1246965811647; Tue, 07 Jul 2009 04:23:31 -0700 (PDT) In-Reply-To: <5bab330d0907070320r224cbf8x3ac6430db816b96d@mail.gmail.com> References: <5bab330d0907070320r224cbf8x3ac6430db816b96d@mail.gmail.com> Date: Tue, 7 Jul 2009 13:23:31 +0200 X-Google-Sender-Auth: b51461ba291ba440 Message-ID: Subject: Re: Generating unique path From: Bertrand Delacretaz To: users@jackrabbit.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Jul 7, 2009 at 12:20 PM, Nigel Sim wrote: > ...In my use case for Jackrabbit I do not have a direct use for paths. I just > have object with properties and relationships which I want to store, and > later retrieve via searching those attributes. > > Is there a way/class/factory I can use to auto generate a unique path > property?... Using time-based paths has worked well for me in similar cases, something like /content/2008/12/31/09/42/03/0001 where you generate a path based on the timestamp when the object is inserted. The trailing 0001 is a global counter that prevents collisions when several objects are inserted within the same second. With Jackrabbit it is not recommended for a node to have more than about 10'000 child nodes, the above convention will also avoid that. -Bertrand