jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: non versioned attributes on versioned nodes?
Date Sat, 16 Feb 2008 10:43:44 GMT
Hi,

On Feb 15, 2008 8:36 PM, Dave Brosius <dbrosius@mebigfatguy.com> wrote:
>     I am trying to add a stream attribute to a versionable node that represents
> auditing information regarding access to the node. To that end, i would prefer
> that the these updates are not done in a checkout()/checkin() scenario as
> i don't want these changes to be represented in the version history.
> When i try to set this property however, i get an exception
>
> javax.jcr.nodetype.ConstraintViolationException: cannot set the value of a protected
property /jcr:system/jcr:versionStorage/9b/7f/44/9b7f44aa-8299-417f-98c7-29080e7968d7/1.0/jcr:frozenNode/AUDIT
>
> Am I doing something wrong, or is it not possible to update properties outside
> of versioning, or am i barking up the wrong tree, and there is a better way to do this?

The version storage is write-protected, you can't modify checked in
versions. You should rather modify the checked out copy in your
workspace.

If you don't want the AUDIT property copied to the version storage
during checkin(), you can define it in a node type like the following:

    <my=your namespace>

    [my:auditable] mixin
    - my:audit (BINARY) IGNORE

Also, would something like a multivalued string property or even a set
of more complex child nodes be more convenient for storing audit
trails? Note that binary properties are not appendable in JCR.

BR,

Jukka Zitting

Mime
View raw message