jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Haderka (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-1690) PM - Simple vs. Bundle - mixin removal handling
Date Wed, 23 Jul 2008 20:31:31 GMT
PM - Simple vs. Bundle - mixin removal handling

                 Key: JCR-1690
                 URL: https://issues.apache.org/jira/browse/JCR-1690
             Project: Jackrabbit
          Issue Type: Bug
    Affects Versions: core 1.4.5
            Reporter: Jan Haderka

Following code (assuming node had mixin mix:versionable before):
leads to difference in stored data based on PM used.
If you perform the operation above and restart your repository
call to:
will return false after restart in both cases, but
hasMixin(node, "mix:versionable");
will return true when repository is using bundled PM. The hasMixin()
method just iterates over all values of jcr:mixinTypes property:

public static void hasMixin(Node node, String mixin) {
  try {
    Value[] vals = node.getProperty("jcr:mixinTypes").getValues();
    for (int i = 0; i < vals.length; i++) {
      if (mixin.equals(vals[i].getString())) {
        return true;
  } catch (PathNotFoundException e) {
    // property not found == can't contain anything
    return false;
  return false;

I think the difference is caused by following code (JR 1.4.5) in
AbstractBundledPersistenceManager (which doesn't seem to have equivalent
in simple PM)

557                // skip primaryType pr mixinTypes properties
558                if (id.getName().equals(QName.JCR_PRIMARYTYPE)
559                    || id.getName().equals(QName.JCR_MIXINTYPES)
560                    || id.getName().equals(QName.JCR_UUID)) {
561                    continue;
562                }

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message