jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: Persistance Manager and references
Date Thu, 15 Sep 2005 15:09:57 GMT
hi aleks,

On 9/8/05, Aleksandar Pecanov <pecanov@mt.net.mk> wrote:
> I was just being curious:
> 
> When the persistance manager tries to remove a node, it tries to load
> it's references.

not quite correct. it first checks the existence of node references:

ItemImpl.checkReferences(), line 831

                    if (stateMgr.hasNodeReferences(id)) {
                        refs = stateMgr.getNodeReferences(id);
                    }

SharedItemStateManager.hasNodeReferences(), line 222

                if (persistMgr.exists(id)) {
                    return true;
                }


> If there are no references the persistance manager
> fails throwing NoSuchItemStateException. 

that shouldn't happen before the persistence manager is asked first to 
check the existence. (see above). 

btw, what persistence manager are you using?

> Isn't it possible that no node
> references were made. I was monitoring the calls to the persistance
> manager, and discovered that no store operation was performed on any
> node references (none that were needed, but I am not sure how jackrabbit
> works so I ignored that fact).
> Can anyone, please give me any explanation?

references to a target node (i.e. properties of type REFERENCE that 
point to a specific target node) are represented by a NodeReferences
object. a NodeReferences object is basically a collection of property ids
(i.e. ids of those properties that refer to a given target node).

NodeReferences are created on demand. if there are no REFERENCE 
properties refering to a given target node, there won't be any corresponding
NodeReferences object for that target node.

cheers
stefan

> 
> Thanx
> 
>

Mime
View raw message