[ http://issues.apache.org/jira/browse/JCR-535?page=comments#action_12426892 ] Jukka Zitting commented on JCR-535: -----------------------------------
> no, it wouldn't. we deliberatly don't allow to replace the root node. > /jcr:system e.g. is protected, > and for a good reason so because it's system managed and not user editable. Note that Nicolas explicitly excludes jcr:system from the backup export, so it isn't being imported. Thus there should be no problem with implementing the "getNode, change, save" cycle for importing jcr:root with REPLACE_EXISTING as specified in 7.3.8. You are right in that the REPLACE_EXISTING is defined to remove the entire replaced subtree, includin in this case /jcr:system, but I think the same logic as we use to prevent modification of protected properties and child nodes in normal imports applies here as well, i.e. the /jcr:system subtree doesn't get removed since it's protected. > Ignore root node when importing through sysView > ----------------------------------------------- > > Key: JCR-535 > URL: http://issues.apache.org/jira/browse/JCR-535 > Project: Jackrabbit > Issue Type: Improvement > Components: core > Reporter: Nicolas Toper > Priority: Minor > Attachments: patch-1-Ignore-root-node.txt > > > When importing through a sysView, we should ignore the root node. It is in > the sysView to provide a root XML node, but the importer is going to attach > it to the repository"s root node... Which would create another root node and > often raise exception. This is a know issue > I needed this behavior to change for the backup tool, since I use the > sysView. Therefore, I havce slightly updated the WorkspaceImporter. Maybe I > should update too the SessionImporter so we have a consistant behavior. What > do you think? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira