jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anton_slutsky <aslut...@applevac.com>
Subject Re: NodeTypeRegistry.checkForReferencesInContent()
Date Thu, 28 Dec 2006 13:39:51 GMT

Hm.  Doesnt look like our implementation will work.  It works for us because
its our application specific, but I doubt it'll work for the project.  Looks
like there are a couple of issues here.  1. The deep locks solutions wont
work because it's not always possible to get all workspaces or all root
nodes given the custom security managers.  2.  The single-user solution
would work, but once we figure out how to place the repository into a
single-user mode, we run into the same issue as in #1, i.e., how do we
inspect nodes if we are not guaranteed to be able to get to them?  

Obviously, there is a bunch of possible solutions here.  Figured I'd run it
by you, see what you all think.  

1. Add a concept of a system superuser.  Will work, but kind of ugly and
adds complexity to authentication
2. Develop some sort of a "metadata" storage.  Some sort of a persistent
structure that will keep track of references for each given type.  Probably
the best thing in the long run, but requires things like hidden, system
stores.  Kind of complicated.
3. Add a reference counter on NodeTypeImpl itself.  Probably the simplest
solution.  Modifications will need to be made to the logic of persisting new
and deleting items (as it would have to be in #2), but this way provides for
the cheapest and quickest way to see if there are live nodes of a certain

Jukka Zitting wrote:
> Hi,
> On 12/26/06, anton_slutsky <aslutsky@applevac.com> wrote:
>> I'm wondering if anyone's actively working on implementing the
>> checkForReferencesInContent() method (quoted below).  Because if not,
>> we'd
>> like to contribute source.  unregisterNodeTypes() doesnt work without it.
>> Makes it a bit of a pain to write unit tests as well as some application
>> functionality.  Please let me know if anyone's doing this already so we
>> dont
>> duplicate effort.
> There's a long-standing feature request JCR-322 about this, but
> although it's popped up in discussion every now and then, there hasn't
> yet been much real effort to resolve it. Contributions would be very
> welcome!
> Note that implementing the method is somewhat hard, as you'd
> essentially need to get a global write lock on the entire repository
> and traverse all the content to find the node type references. This
> operation might also interfere with any pending transient or
> transactional changes.
> BR,
> Jukka Zitting

View this message in context: http://www.nabble.com/NodeTypeRegistry.checkForReferencesInContent%28%29-tf2882955.html#a8074790
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message