jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: FW: [jcr2spi] RepositoryException lost in ItemManager#nodeExists
Date Wed, 24 Jul 2013 13:01:10 GMT
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 = 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] https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemManagerImpl.java#L115
Chetan Mehrotra


On Tue, Jul 23, 2013 at 7:42 PM, Abhinav Atul <aatul@adobe.com> 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
>

Mime
View raw message