From dev-return-13755-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Wed Aug 29 12:44:05 2007 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 59932 invoked from network); 29 Aug 2007 12:44:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Aug 2007 12:44:03 -0000 Received: (qmail 75149 invoked by uid 500); 29 Aug 2007 12:43:48 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 75124 invoked by uid 500); 29 Aug 2007 12:43:48 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 74953 invoked by uid 99); 29 Aug 2007 12:43:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2007 05:43:46 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [213.133.33.40] (HELO smtp.is.nl) (213.133.33.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2007 12:44:38 +0000 Received: from [213.133.51.241] (HELO hai01.hippo.local) by smtp.is.nl (CommuniGate Pro SMTP 5.0.10) with ESMTP id 22638918 for dev@jackrabbit.apache.org; Wed, 29 Aug 2007 14:43:20 +0200 Received: from had13.hippo.nl ([10.10.100.213]) by hai01.hippo.local with Microsoft SMTPSVC(5.0.2195.6713); Wed, 29 Aug 2007 14:43:20 +0200 Received: from had13.hippo.nl (localhost [127.0.0.1]) by had13.hippo.nl (8.13.8/8.13.8) with ESMTP id l7TChJvI010912 for ; Wed, 29 Aug 2007 14:43:19 +0200 Received: (from berry@localhost) by had13.hippo.nl (8.13.8/8.13.8/Submit) id l7TChJrk010911 for dev@jackrabbit.apache.org; Wed, 29 Aug 2007 14:43:19 +0200 Date: Wed, 29 Aug 2007 14:43:19 +0200 From: "(Berry) A.W. van Halderen" To: dev@jackrabbit.apache.org Subject: Re: Database connections & queries Message-ID: <20070829124319.GA26766@had13.hippo.local> References: <34B0CDC6176518459F3A96E8C09196B8062DB767@darth-vader.nijmegen.gx.nl> <510143ac0708241338q36f1f329g6e1d279ec6f20b3a@mail.gmail.com> <510143ac0708280855n42863913j8ed7ce51f797ecef@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <510143ac0708280855n42863913j8ed7ce51f797ecef@mail.gmail.com> User-Agent: Mutt/1.4.2.2i X-OriginalArrivalTime: 29 Aug 2007 12:43:20.0812 (UTC) FILETIME=[2E3D4AC0:01C7EA3A] X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Aug 28, 2007 at 06:55:14PM +0300, Jukka Zitting wrote: > On 8/24/07, Jukka Zitting wrote: > > On 8/22/07, Martijn Hendriks wrote: > > > The current implementation of the LazyScoreNodeIterator is such to > > > ignore all RepositoryExceptions that might be thrown while loading the > > > nodes in the result set, as required by the javax.jcr.NodeIterator spec. > > I think the correct behaviour would be for the node iterator to throw > > an exception (unfortunately I guess only a RuntimeException would work > > here) instead of ignoring such internal errors. > > A thought just crossed my mind... As mentioned in another thread a few > days ago, we could make NodeImpl to load the underlying node states > only on demand as long as we have just the node ID, parent ID, and > name of the node available. This way we could "delay" the exception to > a method like getProperty() that is allowed to throw appropriate > exceptions. > > Besides, such a solution would most likely give a nice speedup to > clients that just want to get the names or paths of nodes that match a > query... Very good idea, decoupling the actual node contents (properties,children) from its outer shell (node id, etc) opens up all kind of possiblities. The NoSuchElement solution is IMO not preferable, as its semantics is already well defined for iterators and not not match this use. \Berry -- Berry A.W. van Halderen b.vanhalderen@hippo.nl / berry@halderen.net Disclaimer: the above is the author's personal opinion and is not the opinion or policy of his employer or of the little green men that have been following him all day.