Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8145C107BD for ; Thu, 25 Jul 2013 07:40:26 +0000 (UTC) Received: (qmail 74328 invoked by uid 500); 25 Jul 2013 07:40:17 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 74286 invoked by uid 500); 25 Jul 2013 07:40:15 -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 74163 invoked by uid 99); 25 Jul 2013 07:40:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2013 07:40:12 +0000 X-ASF-Spam-Status: No, hits=-1.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anchela@adobe.com designates 64.18.1.78 as permitted sender) Received: from [64.18.1.78] (HELO exprod6og127.obsmtp.com) (64.18.1.78) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2013 07:40:06 +0000 Received: from outbound-smtp-1.corp.adobe.com ([192.150.11.134]) by exprod6ob127.postini.com ([64.18.5.12]) with SMTP ID DSNKUfDWQe6XRsSFnWQCYkPfQiZCrM+wHENV@postini.com; Thu, 25 Jul 2013 00:39:45 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 r6P7aID8021487 for ; Thu, 25 Jul 2013 00:36:18 -0700 (PDT) Received: from nacas02.corp.adobe.com (nacas02.corp.adobe.com [10.8.189.100]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r6P7di6A003871 for ; Thu, 25 Jul 2013 00:39:44 -0700 (PDT) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nacas02.corp.adobe.com (10.8.189.100) with Microsoft SMTP Server (TLS) id 8.3.298.1; Thu, 25 Jul 2013 00:39:44 -0700 Received: from eurmbx01.eur.adobe.com ([10.128.4.32]) by eurhub01.eur.adobe.com ([10.128.4.30]) with mapi; Thu, 25 Jul 2013 08:39:42 +0100 From: Angela Schreiber To: "dev@jackrabbit.apache.org" Date: Thu, 25 Jul 2013 08:39:41 +0100 Subject: Re: [jcr2spi] RepositoryException lost in ItemManager#nodeExists Thread-Topic: [jcr2spi] RepositoryException lost in ItemManager#nodeExists Thread-Index: Ac6JCiB7yfOkEt/ITMKaPEf/N6qCQw== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.2.130206 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org hi chetan i wouldn't do that as we generally avoid runtimeexceptions in jackrabbit. instead i would log an error. angela On 7/24/13 3:01 PM, "Chetan Mehrotra" wrote: >Looking at the code [1] > > /** > * @see ItemManager#nodeExists(Path) > */ > public boolean nodeExists(Path path) { > try { > // session-sanity & permissions are checked upon >itemExists(ItemState) > NodeState nodeState =3D hierMgr.getNodeState(path); > return itemExists(nodeState); > } catch (PathNotFoundException pnfe) { > return false; > } catch (ItemNotFoundException infe) { > return false; > } catch (RepositoryException re) { > return false; > } > } > >The catch block for RepositoryException should probably wrap the >exception as a RuntimeException as it might happen for unknown reason. >Changing this might break backward compatibility. Would it be fine to >do that? > >@abhinav - Can you open a bug for this? > >[1]=20 >https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-jcr2spi/src/mai >n/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java#L115 >Chetan Mehrotra > > >On Tue, Jul 23, 2013 at 7:42 PM, Abhinav Atul wrote: >> Just in case if this would be the right place to find a solution. >>Please let me know if anything is unclear. >> >> Thanks >> Abhinav >> >> -----Original Message----- >> From: Abhinav Atul [mailto:aatul@adobe.com] >> Sent: 22 July 2013 14:58 >> To: Jackrabbit Users >> Subject: [jcr2spi] RepositoryException lost in ItemManager#nodeExists >> >> Hi, >> I am trying to implement a synchronization service >>using the jcr connector for Documentum. The issue I am facing is if the >>Documentum server becomes non-responsive while trying to check if a node >>has been updated or deleted at Documentum, the RepositoryException is >>lost in ItemManagerImpl#nodeExists and the synchronization service is >>communicated that the node does not exists which may not be the case. >>Could the RepositoryException be communicated further? >> >> Thanks >> Abhinav >>