[
https://issues.apache.org/jira/browse/JCR-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701945#action_12701945
]
Michael Dürig commented on JCR-2070:
------------------------------------
Yes you're right. I see two options:
1) Check whether any of getPrimaryNodeType() or getMixinNodeTypes() allows for
adding the jcr:content node of the given type. If so create it. Otherwise try
to create jcr:content without explicitly specifying a node type.
2) Try to create jcr:content with the given type. On RepositoryException retry
without explicitly specifying a node type.
For 1) the supertypes should theoretically also be considered. However for a
compliant repository implementation they can be ignored I think. 2) is more
general since it just retries regardless of why adding failed on the first try.
WDYT?
> jcr-server should respect child node definition of jcr:content
> --------------------------------------------------------------
>
> Key: JCR-2070
> URL: https://issues.apache.org/jira/browse/JCR-2070
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-jcr-server
> Reporter: Michael Dürig
> Attachments: JCR-2070-1.patch, JCR-2070.patch
>
>
> When creating a new file, jcr:content defaults to nt:unstructured. This
> causes file creation to fail when the underlying persistent store (i.e. SPI
> implementation) does not support nt:unstructured for jcr:content.
> I suggest to check whether the underlying implementation provides its own
> node type for jcr:content and use that one. If not, default to
> nt:unstructured.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.