Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 83511 invoked from network); 27 Aug 2007 10:06:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Aug 2007 10:06:46 -0000 Received: (qmail 46809 invoked by uid 500); 27 Aug 2007 10:06:42 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 46441 invoked by uid 500); 27 Aug 2007 10:06:41 -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 46431 invoked by uid 99); 27 Aug 2007 10:06:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2007 03:06:41 -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 thomas.tom.mueller@gmail.com designates 64.233.162.227 as permitted sender) Received: from [64.233.162.227] (HELO nz-out-0506.google.com) (64.233.162.227) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2007 10:06:37 +0000 Received: by nz-out-0506.google.com with SMTP id s18so1058742nze for ; Mon, 27 Aug 2007 03:06:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bgMHx3D2C2MKoWTmElGPA/gSqMgi/cTiR4XTNYgiIoAaYIuUkDrowZ4zQJkc4B2D/eH4nfAh3vfDMwWlEBNseoHRwFj6/4tgFw7iJQjoObUbG9CUg4Y2o/w9CjhmbJi/28pNMcoYh6JZTMjVcwMDlyOVZz05e+fdep9mAZ2ds/k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=IAXwhgrIrfBsqBdjkVRnT3oytwkqgr+U2NhCrwKzC81DEpLxImn41tmtGYGEOLxaWh1AvFZm3jKzzWxt6Ji04d/Wz3SUn+VKqRkSbOlQeizXKUdQDR+Dn3ZXAW1jteiWDtFcAjtbOGXmdeZaGnuXzD9nqlDrjrC637kaQW6OxD4= Received: by 10.64.208.20 with SMTP id f20mr10413525qbg.1188209176369; Mon, 27 Aug 2007 03:06:16 -0700 (PDT) Received: by 10.64.253.5 with HTTP; Mon, 27 Aug 2007 03:06:16 -0700 (PDT) Message-ID: <5f211bd50708270306l70249dfeq942351a6f0dfbd2f@mail.gmail.com> Date: Mon, 27 Aug 2007 12:06:16 +0200 From: "Thomas Mueller" To: dev@jackrabbit.apache.org Subject: Re: Database connections & queries In-Reply-To: <46D29B6E.8050806@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <34B0CDC6176518459F3A96E8C09196B8062DB767@darth-vader.nijmegen.gx.nl> <510143ac0708241338q36f1f329g6e1d279ec6f20b3a@mail.gmail.com> <46D29B6E.8050806@gmx.net> X-Virus-Checked: Checked by ClamAV on apache.org Hi, > We could change the behaviour of the iterator to throw a NoSuchElementException. > That's an exception already declared on nextNode(). What about a new JackrabbitRuntimeException? NoSuchElementException is a RuntimeException as well. NoSuchElementException means "the iteration has no more elements", and is thrown if next() was called too many times. I prefer fewer exception classes, but in this case reusing NoSuchElementException doesn't feel right (to me), because the same exception is thrown for a common user error (not calling or ignoring hasNext()), and internal problems like dropped connections. Thomas